, Span),
@@ -1545,6 +1497,28 @@
Err,
}
+/// Used to differentiate between `async {}` blocks and `gen {}` blocks.
+#[derive(Clone, Encodable, Decodable, Debug, PartialEq, Eq)]
+pub enum GenBlockKind {
+ Async,
+ Gen,
+}
+
+impl fmt::Display for GenBlockKind {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ self.modifier().fmt(f)
+ }
+}
+
+impl GenBlockKind {
+ pub fn modifier(&self) -> &'static str {
+ match self {
+ GenBlockKind::Async => "async",
+ GenBlockKind::Gen => "gen",
+ }
+ }
+}
+
/// The explicit `Self` type in a "qualified path". The actual
/// path, including the trait and the associated item, is stored
/// separately. `position` represents the index of the associated
@@ -1574,22 +1548,14 @@
#[derive(Clone, Copy, PartialEq, Encodable, Decodable, Debug, HashStable_Generic)]
pub enum CaptureBy {
/// `move |x| y + x`.
- Value,
+ Value {
+ /// The span of the `move` keyword.
+ move_kw: Span,
+ },
/// `move` keyword was not specified.
Ref,
}
-/// The movability of a generator / closure literal:
-/// whether a generator contains self-references, causing it to be `!Unpin`.
-#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Encodable, Decodable, Debug, Copy)]
-#[derive(HashStable_Generic)]
-pub enum Movability {
- /// May contain self-references, `!Unpin`.
- Static,
- /// Must not contain self-references, `Unpin`.
- Movable,
-}
-
/// Closure lifetime binder, `for<'a, 'b>` in `for<'a, 'b> |_: &'a (), _: &'b ()|`.
#[derive(Clone, Encodable, Decodable, Debug)]
pub enum ClosureBinder {
@@ -2076,6 +2042,8 @@
}
/// The various kinds of type recognized by the compiler.
+//
+// Adding a new variant? Please update `test_ty` in `tests/ui/macros/stringify.rs`.
#[derive(Clone, Encodable, Decodable, Debug)]
pub enum TyKind {
/// A variable-length slice (`[T]`).
@@ -2418,6 +2386,12 @@
No,
}
+#[derive(Copy, Clone, Encodable, Decodable, Debug)]
+pub enum Gen {
+ Yes { span: Span, closure_id: NodeId, return_impl_trait_id: NodeId },
+ No,
+}
+
impl Async {
pub fn is_async(self) -> bool {
matches!(self, Async::Yes { .. })
@@ -2941,6 +2915,7 @@
pub expr: Option>,
}
+// Adding a new variant? Please update `test_item` in `tests/ui/macros/stringify.rs`.
#[derive(Clone, Encodable, Decodable, Debug)]
pub enum ItemKind {
/// An `extern crate` item, with the optional *original* crate name if the crate was renamed.
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/attr/mod.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/attr/mod.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/attr/mod.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/attr/mod.rs 2023-12-21 16:55:28.000000000 +0000
@@ -197,10 +197,10 @@
.unwrap_or_else(|| panic!("attribute is missing tokens: {self:?}"))
.to_attr_token_stream()
.to_tokenstream(),
- &AttrKind::DocComment(comment_kind, data) => TokenStream::new(vec![TokenTree::Token(
- Token::new(token::DocComment(comment_kind, self.style, data), self.span),
- Spacing::Alone,
- )]),
+ &AttrKind::DocComment(comment_kind, data) => TokenStream::token_alone(
+ token::DocComment(comment_kind, self.style, data),
+ self.span,
+ ),
}
}
}
@@ -520,9 +520,7 @@
I: Iterator- ,
{
match tokens.peek() {
- Some(TokenTree::Token(token, _))
- if let Some(lit) = MetaItemLit::from_token(token) =>
- {
+ Some(TokenTree::Token(token, _)) if let Some(lit) = MetaItemLit::from_token(token) => {
tokens.next();
return Some(NestedMetaItem::Lit(lit));
}
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/entry.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/entry.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/entry.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/entry.rs 2023-12-21 16:55:28.000000000 +0000
@@ -1,3 +1,7 @@
+use crate::{attr, Attribute};
+use rustc_span::symbol::sym;
+use rustc_span::Symbol;
+
#[derive(Debug)]
pub enum EntryPointType {
None,
@@ -6,3 +10,28 @@
Start,
OtherMain, // Not an entry point, but some other function named main
}
+
+pub fn entry_point_type(
+ attrs: &[Attribute],
+ at_root: bool,
+ name: Option,
+) -> EntryPointType {
+ if attr::contains_name(attrs, sym::start) {
+ EntryPointType::Start
+ } else if attr::contains_name(attrs, sym::rustc_main) {
+ EntryPointType::RustcMainAttr
+ } else {
+ if let Some(name) = name
+ && name == sym::main
+ {
+ if at_root {
+ // This is a top-level function so it can be `main`.
+ EntryPointType::MainNamed
+ } else {
+ EntryPointType::OtherMain
+ }
+ } else {
+ EntryPointType::None
+ }
+ }
+}
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/lib.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/lib.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/lib.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/lib.rs 2023-12-21 16:55:28.000000000 +0000
@@ -8,6 +8,9 @@
html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/",
test(attr(deny(warnings)))
)]
+#![cfg_attr(not(bootstrap), doc(rust_logo))]
+#![cfg_attr(not(bootstrap), allow(internal_features))]
+#![cfg_attr(not(bootstrap), feature(rustdoc_internals))]
#![feature(associated_type_bounds)]
#![feature(box_patterns)]
#![feature(const_trait_impl)]
@@ -50,14 +53,15 @@
pub use self::ast::*;
pub use self::ast_traits::{AstDeref, AstNodeWrapper, HasAttrs, HasNodeId, HasSpan, HasTokens};
-pub use self::format::*;
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
/// Requirements for a `StableHashingContext` to be used in this crate.
/// This is a hack to allow using the `HashStable_Generic` derive macro
/// instead of implementing everything in `rustc_middle`.
-pub trait HashStableContext: rustc_span::HashStableContext {
+pub trait HashStableContext:
+ rustc_type_ir::HashStableContext + rustc_span::HashStableContext
+{
fn hash_attr(&mut self, _: &ast::Attribute, hasher: &mut StableHasher);
}
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/mut_visit.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/mut_visit.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/mut_visit.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/mut_visit.rs 2023-12-21 16:55:28.000000000 +0000
@@ -302,6 +302,10 @@
fn visit_format_args(&mut self, fmt: &mut FormatArgs) {
noop_visit_format_args(fmt, self)
}
+
+ fn visit_capture_by(&mut self, capture_by: &mut CaptureBy) {
+ noop_visit_capture_by(capture_by, self)
+ }
}
/// Use a map-style function (`FnOnce(T) -> T`) to overwrite a `&mut T`. Useful
@@ -1397,7 +1401,7 @@
}
ExprKind::Closure(box Closure {
binder,
- capture_clause: _,
+ capture_clause,
constness,
asyncness,
movability: _,
@@ -1409,6 +1413,7 @@
vis.visit_closure_binder(binder);
visit_constness(constness, vis);
vis.visit_asyncness(asyncness);
+ vis.visit_capture_by(capture_clause);
vis.visit_fn_decl(fn_decl);
vis.visit_expr(body);
vis.visit_span(fn_decl_span);
@@ -1418,7 +1423,7 @@
vis.visit_block(blk);
visit_opt(label, |label| vis.visit_label(label));
}
- ExprKind::Async(_capture_by, body) => {
+ ExprKind::Gen(_capture_by, body, _) => {
vis.visit_block(body);
}
ExprKind::Await(expr, await_kw_span) => {
@@ -1562,6 +1567,15 @@
vis.visit_span(&mut visibility.span);
}
+pub fn noop_visit_capture_by(capture_by: &mut CaptureBy, vis: &mut T) {
+ match capture_by {
+ CaptureBy::Ref => {}
+ CaptureBy::Value { move_kw } => {
+ vis.visit_span(move_kw);
+ }
+ }
+}
+
/// Some value for the AST node that is valid but possibly meaningless.
pub trait DummyAstNode {
fn dummy() -> Self;
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/token.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/token.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/token.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/token.rs 2023-12-21 16:55:28.000000000 +0000
@@ -107,13 +107,11 @@
/// Keep this in sync with `Token::can_begin_literal_or_bool` excluding unary negation.
pub fn from_token(token: &Token) -> Option {
match token.uninterpolate().kind {
- Ident(name, false) if name.is_bool_lit() => {
- Some(Lit::new(Bool, name, None))
- }
+ Ident(name, false) if name.is_bool_lit() => Some(Lit::new(Bool, name, None)),
Literal(token_lit) => Some(token_lit),
Interpolated(ref nt)
if let NtExpr(expr) | NtLiteral(expr) = &**nt
- && let ast::ExprKind::Lit(token_lit) = expr.kind =>
+ && let ast::ExprKind::Lit(token_lit) = expr.kind =>
{
Some(token_lit)
}
@@ -199,6 +197,7 @@
kw::Continue,
kw::False,
kw::For,
+ kw::Gen,
kw::If,
kw::Let,
kw::Loop,
@@ -229,35 +228,61 @@
#[derive(PartialEq, Encodable, Decodable, Debug, HashStable_Generic)]
pub enum TokenKind {
/* Expression-operator symbols. */
+ /// `=`
Eq,
+ /// `<`
Lt,
+ /// `<=`
Le,
+ /// `==`
EqEq,
+ /// `!=`
Ne,
+ /// `>`
Ge,
+ /// `>=`
Gt,
+ /// `&&`
AndAnd,
+ /// `||`
OrOr,
+ /// `!`
Not,
+ /// `~`
Tilde,
BinOp(BinOpToken),
BinOpEq(BinOpToken),
/* Structural symbols */
+ /// `@`
At,
+ /// `.`
Dot,
+ /// `..`
DotDot,
+ /// `...`
DotDotDot,
+ /// `..=`
DotDotEq,
+ /// `,`
Comma,
+ /// `;`
Semi,
+ /// `:`
Colon,
+ /// `::`
ModSep,
+ /// `->`
RArrow,
+ /// `<-`
LArrow,
+ /// `=>`
FatArrow,
+ /// `#`
Pound,
+ /// `$`
Dollar,
+ /// `?`
Question,
/// Used by proc macros for representing lifetimes, not generated by lexer right now.
SingleQuote,
@@ -296,6 +321,7 @@
/// similarly to symbols in string literal tokens.
DocComment(CommentKind, ast::AttrStyle, Symbol),
+ /// End Of File
Eof,
}
@@ -404,7 +430,7 @@
[DotDot, DotDotDot, DotDotEq].contains(&self.kind)
}
- pub fn is_op(&self) -> bool {
+ pub fn is_punct(&self) -> bool {
match self.kind {
Eq | Lt | Le | EqEq | Ne | Ge | Gt | AndAnd | OrOr | Not | Tilde | BinOp(_)
| BinOpEq(_) | At | Dot | DotDot | DotDotDot | DotDotEq | Comma | Semi | Colon
@@ -446,7 +472,7 @@
}
}
- /// Returns `true` if the token can appear at the start of an pattern.
+ /// Returns `true` if the token can appear at the start of a pattern.
///
/// Shamelessly borrowed from `can_begin_expr`, only used for diagnostics right now.
pub fn can_begin_pattern(&self) -> bool {
@@ -628,7 +654,9 @@
/// Returns `true` if the token is an interpolated path.
fn is_path(&self) -> bool {
- if let Interpolated(nt) = &self.kind && let NtPath(..) = **nt {
+ if let Interpolated(nt) = &self.kind
+ && let NtPath(..) = **nt
+ {
return true;
}
@@ -650,7 +678,9 @@
/// Is the token an interpolated block (`$b:block`)?
pub fn is_whole_block(&self) -> bool {
- if let Interpolated(nt) = &self.kind && let NtBlock(..) = **nt {
+ if let Interpolated(nt) = &self.kind
+ && let NtBlock(..) = **nt
+ {
return true;
}
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/tokenstream.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/tokenstream.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/tokenstream.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/tokenstream.rs 2023-12-21 16:55:28.000000000 +0000
@@ -550,7 +550,9 @@
let stream_iter = stream.0.iter().cloned();
- if let Some(first) = stream.0.first() && Self::try_glue_to_last(vec_mut, first) {
+ if let Some(first) = stream.0.first()
+ && Self::try_glue_to_last(vec_mut, first)
+ {
// Now skip the first token tree from `stream`.
vec_mut.extend(stream_iter.skip(1));
} else {
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/util/classify.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/util/classify.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/util/classify.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/util/classify.rs 2023-12-21 16:55:28.000000000 +0000
@@ -46,7 +46,7 @@
Closure(closure) => {
expr = &closure.body;
}
- Async(..) | Block(..) | ForLoop(..) | If(..) | Loop(..) | Match(..) | Struct(..)
+ Gen(..) | Block(..) | ForLoop(..) | If(..) | Loop(..) | Match(..) | Struct(..)
| TryBlock(..) | While(..) => break Some(expr),
_ => break None,
}
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/util/parser.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/util/parser.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/util/parser.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/util/parser.rs 2023-12-21 16:55:28.000000000 +0000
@@ -285,7 +285,7 @@
Block,
TryBlock,
Struct,
- Async,
+ Gen,
Await,
Err,
}
@@ -351,7 +351,7 @@
| ExprPrecedence::ConstBlock
| ExprPrecedence::Block
| ExprPrecedence::TryBlock
- | ExprPrecedence::Async
+ | ExprPrecedence::Gen
| ExprPrecedence::Struct
| ExprPrecedence::Err => PREC_PAREN,
}
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/visit.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/visit.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/visit.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast/src/visit.rs 2023-12-21 16:55:28.000000000 +0000
@@ -251,6 +251,9 @@
fn visit_inline_asm_sym(&mut self, sym: &'ast InlineAsmSym) {
walk_inline_asm_sym(self, sym)
}
+ fn visit_capture_by(&mut self, _capture_by: &'ast CaptureBy) {
+ // Nothing to do
+ }
}
#[macro_export]
@@ -857,7 +860,7 @@
}
ExprKind::Closure(box Closure {
binder,
- capture_clause: _,
+ capture_clause,
asyncness: _,
constness: _,
movability: _,
@@ -866,13 +869,14 @@
fn_decl_span: _,
fn_arg_span: _,
}) => {
+ visitor.visit_capture_by(capture_clause);
visitor.visit_fn(FnKind::Closure(binder, fn_decl, body), expression.span, expression.id)
}
ExprKind::Block(block, opt_label) => {
walk_list!(visitor, visit_label, opt_label);
visitor.visit_block(block);
}
- ExprKind::Async(_, body) => {
+ ExprKind::Gen(_, body, _) => {
visitor.visit_block(body);
}
ExprKind::Await(expr, _) => visitor.visit_expr(expr),
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/Cargo.toml rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/Cargo.toml
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/Cargo.toml 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/Cargo.toml 2023-12-21 16:55:28.000000000 +0000
@@ -7,18 +7,20 @@
doctest = false
[dependencies]
+# tidy-alphabetical-start
rustc_ast = { path = "../rustc_ast" }
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
rustc_data_structures = { path = "../rustc_data_structures" }
rustc_errors = { path = "../rustc_errors" }
-rustc_hir = { path = "../rustc_hir" }
rustc_fluent_macro = { path = "../rustc_fluent_macro" }
+rustc_hir = { path = "../rustc_hir" }
rustc_index = { path = "../rustc_index" }
-rustc_middle = { path = "../rustc_middle" }
rustc_macros = { path = "../rustc_macros" }
+rustc_middle = { path = "../rustc_middle" }
rustc_session = { path = "../rustc_session" }
rustc_span = { path = "../rustc_span" }
rustc_target = { path = "../rustc_target" }
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
thin-vec = "0.2.12"
tracing = "0.1"
+# tidy-alphabetical-end
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/messages.ftl rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/messages.ftl
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/messages.ftl 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/messages.ftl 2023-12-21 16:55:28.000000000 +0000
@@ -11,8 +11,8 @@
ast_lowering_assoc_ty_parentheses =
parenthesized generic arguments cannot be used in associated type constraints
-ast_lowering_async_generators_not_supported =
- `async` generators are not yet supported
+ast_lowering_async_coroutines_not_supported =
+ `async` coroutines are not yet supported
ast_lowering_async_non_move_closure_not_supported =
`async` non-`move` closures with parameters are not currently supported
@@ -42,6 +42,9 @@
ast_lowering_closure_cannot_be_static = closures cannot be static
+ast_lowering_coroutine_too_many_parameters =
+ too many parameters for a coroutine (expected 0 or 1 parameters)
+
ast_lowering_does_not_support_modifiers =
the `{$class_name}` register class does not support template modifiers
@@ -53,9 +56,6 @@
functional record updates are not allowed in destructuring assignments
.suggestion = consider removing the trailing pattern
-ast_lowering_generator_too_many_parameters =
- too many parameters for a generator (expected 0 or 1 parameters)
-
ast_lowering_generic_type_with_parentheses =
parenthesized type parameters may only be used with a `Fn` trait
.label = only `Fn` traits may use parentheses
@@ -99,7 +99,7 @@
.note = only allowed in tuple, tuple struct, and slice patterns
ast_lowering_misplaced_impl_trait =
- `impl Trait` only allowed in function and inherent method return types, not in {$position}
+ `impl Trait` only allowed in function and inherent method argument and return types, not in {$position}
ast_lowering_misplaced_relax_trait_bound =
`?Trait` bounds are only permitted at the point where a type parameter is declared
@@ -136,12 +136,6 @@
ast_lowering_this_not_async = this is not `async`
-ast_lowering_trait_fn_async =
- functions in traits cannot be declared `async`
- .label = `async` because of this
- .note = `async` trait functions are not currently supported
- .note2 = consider using the `async-trait` crate: https://crates.io/crates/async-trait
-
ast_lowering_underscore_expr_lhs_assign =
in expressions, `_` can only be used on the left-hand side of an assignment
.label = `_` not allowed here
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/src/errors.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/src/errors.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/src/errors.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/src/errors.rs 2023-12-21 16:55:28.000000000 +0000
@@ -131,8 +131,8 @@
}
#[derive(Diagnostic, Clone, Copy)]
-#[diag(ast_lowering_generator_too_many_parameters, code = "E0628")]
-pub struct GeneratorTooManyParameters {
+#[diag(ast_lowering_coroutine_too_many_parameters, code = "E0628")]
+pub struct CoroutineTooManyParameters {
#[primary_span]
pub fn_decl_span: Span,
}
@@ -161,8 +161,8 @@
}
#[derive(Diagnostic, Clone, Copy)]
-#[diag(ast_lowering_async_generators_not_supported, code = "E0727")]
-pub struct AsyncGeneratorsNotSupported {
+#[diag(ast_lowering_async_coroutines_not_supported, code = "E0727")]
+pub struct AsyncCoroutinesNotSupported {
#[primary_span]
pub span: Span,
}
@@ -354,17 +354,6 @@
pub span: Span,
}
-#[derive(Diagnostic, Clone, Copy)]
-#[diag(ast_lowering_trait_fn_async, code = "E0706")]
-#[note]
-#[note(ast_lowering_note2)]
-pub struct TraitFnAsync {
- #[primary_span]
- pub fn_span: Span,
- #[label]
- pub span: Span,
-}
-
#[derive(Diagnostic)]
pub enum BadReturnTypeNotation {
#[diag(ast_lowering_bad_return_type_notation_inputs)]
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/src/expr.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/src/expr.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/src/expr.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/src/expr.rs 2023-12-21 16:55:28.000000000 +0000
@@ -1,8 +1,8 @@
use super::errors::{
- AsyncGeneratorsNotSupported, AsyncNonMoveClosureNotSupported, AwaitOnlyInAsyncFnAndBlocks,
- BaseExpressionDoubleDot, ClosureCannotBeStatic, FunctionalRecordUpdateDestructuringAssignment,
- GeneratorTooManyParameters, InclusiveRangeWithNoEnd, NotSupportedForLifetimeBinderAsyncClosure,
- UnderscoreExprLhsAssign,
+ AsyncCoroutinesNotSupported, AsyncNonMoveClosureNotSupported, AwaitOnlyInAsyncFnAndBlocks,
+ BaseExpressionDoubleDot, ClosureCannotBeStatic, CoroutineTooManyParameters,
+ FunctionalRecordUpdateDestructuringAssignment, InclusiveRangeWithNoEnd,
+ NotSupportedForLifetimeBinderAsyncClosure, UnderscoreExprLhsAssign,
};
use super::ResolverAstLoweringExt;
use super::{ImplTraitContext, LoweringContext, ParamMode, ParenthesizedGenericArgs};
@@ -15,9 +15,10 @@
use rustc_hir::def::Res;
use rustc_hir::definitions::DefPathData;
use rustc_session::errors::report_lit_error;
-use rustc_span::source_map::{respan, DesugaringKind, Span, Spanned};
+use rustc_span::source_map::{respan, Spanned};
use rustc_span::symbol::{sym, Ident, Symbol};
use rustc_span::DUMMY_SP;
+use rustc_span::{DesugaringKind, Span};
use thin_vec::{thin_vec, ThinVec};
impl<'hir> LoweringContext<'_, 'hir> {
@@ -183,12 +184,12 @@
self.arena.alloc_from_iter(arms.iter().map(|x| self.lower_arm(x))),
hir::MatchSource::Normal,
),
- ExprKind::Async(capture_clause, block) => self.make_async_expr(
+ ExprKind::Gen(capture_clause, block, GenBlockKind::Async) => self.make_async_expr(
*capture_clause,
e.id,
None,
e.span,
- hir::AsyncGeneratorKind::Block,
+ hir::CoroutineSource::Block,
|this| this.with_new_scopes(|this| this.lower_block_expr(block)),
),
ExprKind::Await(expr, await_kw_span) => self.lower_expr_await(*await_kw_span, expr),
@@ -317,6 +318,14 @@
rest,
)
}
+ ExprKind::Gen(capture_clause, block, GenBlockKind::Gen) => self.make_gen_expr(
+ *capture_clause,
+ e.id,
+ None,
+ e.span,
+ hir::CoroutineSource::Block,
+ |this| this.with_new_scopes(|this| this.lower_block_expr(block)),
+ ),
ExprKind::Yield(opt_expr) => self.lower_expr_yield(e.span, opt_expr.as_deref()),
ExprKind::Err => hir::ExprKind::Err(
self.tcx.sess.delay_span_bug(e.span, "lowered ExprKind::Err"),
@@ -583,7 +592,7 @@
}
}
- /// Lower an `async` construct to a generator that implements `Future`.
+ /// Lower an `async` construct to a coroutine that implements `Future`.
///
/// This results in:
///
@@ -598,7 +607,7 @@
closure_node_id: NodeId,
ret_ty: Option>,
span: Span,
- async_gen_kind: hir::AsyncGeneratorKind,
+ async_coroutine_source: hir::CoroutineSource,
body: impl FnOnce(&mut Self) -> hir::Expr<'hir>,
) -> hir::ExprKind<'hir> {
let output = ret_ty.unwrap_or_else(|| hir::FnRetTy::DefaultReturn(self.lower_span(span)));
@@ -613,7 +622,7 @@
span: unstable_span,
};
- // The closure/generator `FnDecl` takes a single (resume) argument of type `input_ty`.
+ // The closure/coroutine `FnDecl` takes a single (resume) argument of type `input_ty`.
let fn_decl = self.arena.alloc(hir::FnDecl {
inputs: arena_vec![self; input_ty],
output,
@@ -637,7 +646,7 @@
let params = arena_vec![self; param];
let body = self.lower_body(move |this| {
- this.generator_kind = Some(hir::GeneratorKind::Async(async_gen_kind));
+ this.coroutine_kind = Some(hir::CoroutineKind::Async(async_coroutine_source));
let old_ctx = this.task_context;
this.task_context = Some(task_context_hid);
@@ -661,6 +670,57 @@
}))
}
+ /// Lower a `gen` construct to a generator that implements `Iterator`.
+ ///
+ /// This results in:
+ ///
+ /// ```text
+ /// static move? |()| -> () {
+ ///
+ /// }
+ /// ```
+ pub(super) fn make_gen_expr(
+ &mut self,
+ capture_clause: CaptureBy,
+ closure_node_id: NodeId,
+ _yield_ty: Option>,
+ span: Span,
+ coroutine_source: hir::CoroutineSource,
+ body: impl FnOnce(&mut Self) -> hir::Expr<'hir>,
+ ) -> hir::ExprKind<'hir> {
+ let output = hir::FnRetTy::DefaultReturn(self.lower_span(span));
+
+ // The closure/generator `FnDecl` takes a single (resume) argument of type `input_ty`.
+ let fn_decl = self.arena.alloc(hir::FnDecl {
+ inputs: &[],
+ output,
+ c_variadic: false,
+ implicit_self: hir::ImplicitSelfKind::None,
+ lifetime_elision_allowed: false,
+ });
+
+ let body = self.lower_body(move |this| {
+ this.coroutine_kind = Some(hir::CoroutineKind::Gen(coroutine_source));
+
+ let res = body(this);
+ (&[], res)
+ });
+
+ // `static |()| -> () { body }`:
+ hir::ExprKind::Closure(self.arena.alloc(hir::Closure {
+ def_id: self.local_def_id(closure_node_id),
+ binder: hir::ClosureBinder::Default,
+ capture_clause,
+ bound_generic_params: &[],
+ fn_decl,
+ body,
+ fn_decl_span: self.lower_span(span),
+ fn_arg_span: None,
+ movability: Some(Movability::Movable),
+ constness: hir::Constness::NotConst,
+ }))
+ }
+
/// Forwards a possible `#[track_caller]` annotation from `outer_hir_id` to
/// `inner_hir_id` in case the `async_fn_track_caller` feature is enabled.
pub(super) fn maybe_forward_track_caller(
@@ -673,12 +733,18 @@
&& let Some(attrs) = self.attrs.get(&outer_hir_id.local_id)
&& attrs.into_iter().any(|attr| attr.has_name(sym::track_caller))
{
- let unstable_span =
- self.mark_span_with_reason(DesugaringKind::Async, span, self.allow_gen_future.clone());
+ let unstable_span = self.mark_span_with_reason(
+ DesugaringKind::Async,
+ span,
+ self.allow_gen_future.clone(),
+ );
self.lower_attrs(
inner_hir_id,
&[Attribute {
- kind: AttrKind::Normal(ptr::P(NormalAttr::from_ident(Ident::new(sym::track_caller, span)))),
+ kind: AttrKind::Normal(ptr::P(NormalAttr::from_ident(Ident::new(
+ sym::track_caller,
+ span,
+ )))),
id: self.tcx.sess.parse_sess.attr_id_generator.mk_attr_id(),
style: AttrStyle::Outer,
span: unstable_span,
@@ -704,9 +770,9 @@
/// ```
fn lower_expr_await(&mut self, await_kw_span: Span, expr: &Expr) -> hir::ExprKind<'hir> {
let full_span = expr.span.to(await_kw_span);
- match self.generator_kind {
- Some(hir::GeneratorKind::Async(_)) => {}
- Some(hir::GeneratorKind::Gen) | None => {
+ match self.coroutine_kind {
+ Some(hir::CoroutineKind::Async(_)) => {}
+ Some(hir::CoroutineKind::Coroutine) | Some(hir::CoroutineKind::Gen(_)) | None => {
self.tcx.sess.emit_err(AwaitOnlyInAsyncFnAndBlocks {
await_kw_span,
item_span: self.current_item,
@@ -881,19 +947,19 @@
) -> hir::ExprKind<'hir> {
let (binder_clause, generic_params) = self.lower_closure_binder(binder);
- let (body_id, generator_option) = self.with_new_scopes(move |this| {
+ let (body_id, coroutine_option) = self.with_new_scopes(move |this| {
let prev = this.current_item;
this.current_item = Some(fn_decl_span);
- let mut generator_kind = None;
+ let mut coroutine_kind = None;
let body_id = this.lower_fn_body(decl, |this| {
let e = this.lower_expr_mut(body);
- generator_kind = this.generator_kind;
+ coroutine_kind = this.coroutine_kind;
e
});
- let generator_option =
- this.generator_movability_for_fn(&decl, fn_decl_span, generator_kind, movability);
+ let coroutine_option =
+ this.coroutine_movability_for_fn(&decl, fn_decl_span, coroutine_kind, movability);
this.current_item = prev;
- (body_id, generator_option)
+ (body_id, coroutine_option)
});
let bound_generic_params = self.lower_lifetime_binder(closure_id, generic_params);
@@ -909,29 +975,29 @@
body: body_id,
fn_decl_span: self.lower_span(fn_decl_span),
fn_arg_span: Some(self.lower_span(fn_arg_span)),
- movability: generator_option,
+ movability: coroutine_option,
constness: self.lower_constness(constness),
});
hir::ExprKind::Closure(c)
}
- fn generator_movability_for_fn(
+ fn coroutine_movability_for_fn(
&mut self,
decl: &FnDecl,
fn_decl_span: Span,
- generator_kind: Option,
+ coroutine_kind: Option,
movability: Movability,
) -> Option {
- match generator_kind {
- Some(hir::GeneratorKind::Gen) => {
+ match coroutine_kind {
+ Some(hir::CoroutineKind::Coroutine) => {
if decl.inputs.len() > 1 {
- self.tcx.sess.emit_err(GeneratorTooManyParameters { fn_decl_span });
+ self.tcx.sess.emit_err(CoroutineTooManyParameters { fn_decl_span });
}
Some(movability)
}
- Some(hir::GeneratorKind::Async(_)) => {
- panic!("non-`async` closure body turned `async` during lowering");
+ Some(hir::CoroutineKind::Gen(_)) | Some(hir::CoroutineKind::Async(_)) => {
+ panic!("non-`async`/`gen` closure body turned `async`/`gen` during lowering");
}
None => {
if movability == Movability::Static {
@@ -999,7 +1065,7 @@
inner_closure_id,
async_ret_ty,
body.span,
- hir::AsyncGeneratorKind::Closure,
+ hir::CoroutineSource::Closure,
|this| this.with_new_scopes(|this| this.lower_expr_mut(body)),
);
let hir_id = this.lower_node_id(inner_closure_id);
@@ -1102,7 +1168,9 @@
if let ExprKind::Path(qself, path) = &expr.kind {
// Does the path resolve to something disallowed in a tuple struct/variant pattern?
if let Some(partial_res) = self.resolver.get_partial_res(expr.id) {
- if let Some(res) = partial_res.full_res() && !res.expected_in_tuple_struct_pat() {
+ if let Some(res) = partial_res.full_res()
+ && !res.expected_in_tuple_struct_pat()
+ {
return None;
}
}
@@ -1122,7 +1190,9 @@
if let ExprKind::Path(qself, path) = &expr.kind {
// Does the path resolve to something disallowed in a unit struct/variant pattern?
if let Some(partial_res) = self.resolver.get_partial_res(expr.id) {
- if let Some(res) = partial_res.full_res() && !res.expected_in_unit_struct_pat() {
+ if let Some(res) = partial_res.full_res()
+ && !res.expected_in_unit_struct_pat()
+ {
return None;
}
}
@@ -1434,12 +1504,23 @@
}
fn lower_expr_yield(&mut self, span: Span, opt_expr: Option<&Expr>) -> hir::ExprKind<'hir> {
- match self.generator_kind {
- Some(hir::GeneratorKind::Gen) => {}
- Some(hir::GeneratorKind::Async(_)) => {
- self.tcx.sess.emit_err(AsyncGeneratorsNotSupported { span });
+ match self.coroutine_kind {
+ Some(hir::CoroutineKind::Gen(_)) => {}
+ Some(hir::CoroutineKind::Async(_)) => {
+ self.tcx.sess.emit_err(AsyncCoroutinesNotSupported { span });
+ }
+ Some(hir::CoroutineKind::Coroutine) | None => {
+ if !self.tcx.features().coroutines {
+ rustc_session::parse::feature_err(
+ &self.tcx.sess.parse_sess,
+ sym::coroutines,
+ span,
+ "yield syntax is experimental",
+ )
+ .emit();
+ }
+ self.coroutine_kind = Some(hir::CoroutineKind::Coroutine)
}
- None => self.generator_kind = Some(hir::GeneratorKind::Gen),
}
let expr =
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/src/format.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/src/format.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/src/format.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/src/format.rs 2023-12-21 16:55:28.000000000 +0000
@@ -61,9 +61,12 @@
let remaining_args = args.split_off(arg_index + 1);
let old_arg_offset = args.len();
let mut fmt2 = &mut args.pop().unwrap().expr; // The inner FormatArgs.
- let fmt2 = loop { // Unwrap the Expr to get to the FormatArgs.
+ let fmt2 = loop {
+ // Unwrap the Expr to get to the FormatArgs.
match &mut fmt2.kind {
- ExprKind::Paren(inner) | ExprKind::AddrOf(BorrowKind::Ref, _, inner) => fmt2 = inner,
+ ExprKind::Paren(inner) | ExprKind::AddrOf(BorrowKind::Ref, _, inner) => {
+ fmt2 = inner
+ }
ExprKind::FormatArgs(fmt2) => break fmt2,
_ => unreachable!(),
}
@@ -410,15 +413,11 @@
let format_options = use_format_options.then(|| {
// Generate:
// &[format_spec_0, format_spec_1, format_spec_2]
- let elements: Vec<_> = fmt
- .template
- .iter()
- .filter_map(|piece| {
- let FormatArgsPiece::Placeholder(placeholder) = piece else { return None };
- Some(make_format_spec(ctx, macsp, placeholder, &mut argmap))
- })
- .collect();
- ctx.expr_array_ref(macsp, ctx.arena.alloc_from_iter(elements))
+ let elements = ctx.arena.alloc_from_iter(fmt.template.iter().filter_map(|piece| {
+ let FormatArgsPiece::Placeholder(placeholder) = piece else { return None };
+ Some(make_format_spec(ctx, macsp, placeholder, &mut argmap))
+ }));
+ ctx.expr_array_ref(macsp, elements)
});
let arguments = fmt.arguments.all_args();
@@ -477,10 +476,8 @@
// ::new_debug(&arg2),
// …
// ]
- let elements: Vec<_> = arguments
- .iter()
- .zip(argmap)
- .map(|(arg, ((_, ty), placeholder_span))| {
+ let elements = ctx.arena.alloc_from_iter(arguments.iter().zip(argmap).map(
+ |(arg, ((_, ty), placeholder_span))| {
let placeholder_span =
placeholder_span.unwrap_or(arg.expr.span).with_ctxt(macsp.ctxt());
let arg_span = match arg.kind {
@@ -493,9 +490,9 @@
hir::ExprKind::AddrOf(hir::BorrowKind::Ref, hir::Mutability::Not, arg),
));
make_argument(ctx, placeholder_span, ref_arg, ty)
- })
- .collect();
- ctx.expr_array_ref(macsp, ctx.arena.alloc_from_iter(elements))
+ },
+ ));
+ ctx.expr_array_ref(macsp, elements)
} else {
// Generate:
// &match (&arg0, &arg1, &…) {
@@ -528,19 +525,14 @@
make_argument(ctx, placeholder_span, arg, ty)
},
));
- let elements: Vec<_> = arguments
- .iter()
- .map(|arg| {
- let arg_expr = ctx.lower_expr(&arg.expr);
- ctx.expr(
- arg.expr.span.with_ctxt(macsp.ctxt()),
- hir::ExprKind::AddrOf(hir::BorrowKind::Ref, hir::Mutability::Not, arg_expr),
- )
- })
- .collect();
- let args_tuple = ctx
- .arena
- .alloc(ctx.expr(macsp, hir::ExprKind::Tup(ctx.arena.alloc_from_iter(elements))));
+ let elements = ctx.arena.alloc_from_iter(arguments.iter().map(|arg| {
+ let arg_expr = ctx.lower_expr(&arg.expr);
+ ctx.expr(
+ arg.expr.span.with_ctxt(macsp.ctxt()),
+ hir::ExprKind::AddrOf(hir::BorrowKind::Ref, hir::Mutability::Not, arg_expr),
+ )
+ }));
+ let args_tuple = ctx.arena.alloc(ctx.expr(macsp, hir::ExprKind::Tup(elements)));
let array = ctx.arena.alloc(ctx.expr(macsp, hir::ExprKind::Array(args)));
let match_arms = ctx.arena.alloc_from_iter([ctx.arm(args_pat, array)]);
let match_expr = ctx.arena.alloc(ctx.expr_match(
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/src/item.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/src/item.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/src/item.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/src/item.rs 2023-12-21 16:55:28.000000000 +0000
@@ -16,9 +16,8 @@
use rustc_index::{Idx, IndexSlice, IndexVec};
use rustc_middle::ty::{ResolverAstLowering, TyCtxt};
use rustc_span::edit_distance::find_best_match_for_name;
-use rustc_span::source_map::DesugaringKind;
use rustc_span::symbol::{kw, sym, Ident};
-use rustc_span::{Span, Symbol};
+use rustc_span::{DesugaringKind, Span, Symbol};
use rustc_target::spec::abi;
use smallvec::{smallvec, SmallVec};
use thin_vec::ThinVec;
@@ -82,7 +81,7 @@
is_in_loop_condition: false,
is_in_trait_impl: false,
is_in_dyn_type: false,
- generator_kind: None,
+ coroutine_kind: None,
task_context: None,
current_item: None,
impl_trait_defs: Vec::new(),
@@ -974,7 +973,7 @@
value: hir::Expr<'hir>,
) -> hir::BodyId {
let body = hir::Body {
- generator_kind: self.generator_kind,
+ coroutine_kind: self.coroutine_kind,
params,
value: self.arena.alloc(value),
};
@@ -988,12 +987,12 @@
&mut self,
f: impl FnOnce(&mut Self) -> (&'hir [hir::Param<'hir>], hir::Expr<'hir>),
) -> hir::BodyId {
- let prev_gen_kind = self.generator_kind.take();
+ let prev_coroutine_kind = self.coroutine_kind.take();
let task_context = self.task_context.take();
let (parameters, result) = f(self);
let body_id = self.record_body(parameters, result);
self.task_context = task_context;
- self.generator_kind = prev_gen_kind;
+ self.coroutine_kind = prev_coroutine_kind;
body_id
}
@@ -1202,11 +1201,11 @@
}
let async_expr = this.make_async_expr(
- CaptureBy::Value,
+ CaptureBy::Value { move_kw: rustc_span::DUMMY_SP },
closure_id,
None,
body.span,
- hir::AsyncGeneratorKind::Fn,
+ hir::CoroutineSource::Fn,
|this| {
// Create a block from the user's function body:
let user_body = this.lower_block_expr(body);
@@ -1387,10 +1386,12 @@
// Desugar `~const` bound in generics into an additional `const host: bool` param
// if the effects feature is enabled. This needs to be done before we lower where
// clauses since where clauses need to bind to the DefId of the host param
- let host_param_parts = if let Const::Yes(span) = constness && self.tcx.features().effects {
- if let Some(param) = generics.params.iter().find(|x| {
- x.attrs.iter().any(|x| x.has_name(sym::rustc_host))
- }) {
+ let host_param_parts = if let Const::Yes(span) = constness
+ && self.tcx.features().effects
+ {
+ if let Some(param) =
+ generics.params.iter().find(|x| x.attrs.iter().any(|x| x.has_name(sym::rustc_host)))
+ {
// user has manually specified a `rustc_host` param, in this case, we set
// the param id so that lowering logic can use that. But we don't create
// another host param, so this gives `None`.
@@ -1399,7 +1400,12 @@
} else {
let param_node_id = self.next_node_id();
let hir_id = self.next_id();
- let def_id = self.create_def(self.local_def_id(parent_node_id), param_node_id, DefPathData::TypeNs(sym::host), span);
+ let def_id = self.create_def(
+ self.local_def_id(parent_node_id),
+ param_node_id,
+ DefPathData::TypeNs(sym::host),
+ span,
+ );
self.host_param_id = Some(def_id);
Some((span, hir_id, def_id))
}
@@ -1623,12 +1629,10 @@
.lower_generic_params(bound_generic_params, hir::GenericParamSource::Binder),
bounded_ty: self
.lower_ty(bounded_ty, &ImplTraitContext::Disallowed(ImplTraitPosition::Bound)),
- bounds: self.arena.alloc_from_iter(bounds.iter().map(|bound| {
- self.lower_param_bound(
- bound,
- &ImplTraitContext::Disallowed(ImplTraitPosition::Bound),
- )
- })),
+ bounds: self.lower_param_bounds(
+ bounds,
+ &ImplTraitContext::Disallowed(ImplTraitPosition::Bound),
+ ),
span: self.lower_span(*span),
origin: PredicateOrigin::WhereClause,
}),
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/src/lib.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/src/lib.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/src/lib.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/src/lib.rs 2023-12-21 16:55:28.000000000 +0000
@@ -30,6 +30,9 @@
//! get confused if the spans from leaf AST nodes occur in multiple places
//! in the HIR, especially for multiple identifiers.
+#![cfg_attr(not(bootstrap), allow(internal_features))]
+#![cfg_attr(not(bootstrap), feature(rustdoc_internals))]
+#![cfg_attr(not(bootstrap), doc(rust_logo))]
#![feature(box_patterns)]
#![feature(let_chains)]
#![feature(never_type)]
@@ -40,7 +43,7 @@
#[macro_use]
extern crate tracing;
-use crate::errors::{AssocTyParentheses, AssocTyParenthesesSub, MisplacedImplTrait, TraitFnAsync};
+use crate::errors::{AssocTyParentheses, AssocTyParenthesesSub, MisplacedImplTrait};
use rustc_ast::ptr::P;
use rustc_ast::visit;
@@ -68,9 +71,8 @@
};
use rustc_session::parse::{add_feature_diagnostics, feature_err};
use rustc_span::hygiene::MacroKind;
-use rustc_span::source_map::DesugaringKind;
use rustc_span::symbol::{kw, sym, Ident, Symbol};
-use rustc_span::{Span, DUMMY_SP};
+use rustc_span::{DesugaringKind, Span, DUMMY_SP};
use smallvec::SmallVec;
use std::collections::hash_map::Entry;
use thin_vec::ThinVec;
@@ -108,10 +110,10 @@
/// Collect items that were created by lowering the current owner.
children: Vec<(LocalDefId, hir::MaybeOwner<&'hir hir::OwnerInfo<'hir>>)>,
- generator_kind: Option,
+ coroutine_kind: Option,
/// When inside an `async` context, this is the `HirId` of the
- /// `task_context` local bound to the resume argument of the generator.
+ /// `task_context` local bound to the resume argument of the coroutine.
task_context: Option,
/// Used to get the current `fn`'s def span to point to when using `await`
@@ -271,8 +273,6 @@
ClosureReturn,
PointerReturn,
FnTraitReturn,
- TraitReturn,
- ImplReturn,
GenericDefault,
ConstTy,
StaticTy,
@@ -302,8 +302,6 @@
ImplTraitPosition::ClosureReturn => "closure return types",
ImplTraitPosition::PointerReturn => "`fn` pointer return types",
ImplTraitPosition::FnTraitReturn => "`Fn` trait return types",
- ImplTraitPosition::TraitReturn => "trait method return types",
- ImplTraitPosition::ImplReturn => "`impl` method return types",
ImplTraitPosition::GenericDefault => "generic parameter defaults",
ImplTraitPosition::ConstTy => "const types",
ImplTraitPosition::StaticTy => "static types",
@@ -334,20 +332,9 @@
matches!(self, FnDeclKind::Fn | FnDeclKind::Inherent | FnDeclKind::Impl | FnDeclKind::Trait)
}
- fn return_impl_trait_allowed(&self, tcx: TyCtxt<'_>) -> bool {
+ fn return_impl_trait_allowed(&self) -> bool {
match self {
- FnDeclKind::Fn | FnDeclKind::Inherent => true,
- FnDeclKind::Impl if tcx.features().return_position_impl_trait_in_trait => true,
- FnDeclKind::Trait if tcx.features().return_position_impl_trait_in_trait => true,
- _ => false,
- }
- }
-
- fn async_fn_allowed(&self, tcx: TyCtxt<'_>) -> bool {
- match self {
- FnDeclKind::Fn | FnDeclKind::Inherent => true,
- FnDeclKind::Impl if tcx.features().async_fn_in_trait => true,
- FnDeclKind::Trait if tcx.features().async_fn_in_trait => true,
+ FnDeclKind::Fn | FnDeclKind::Inherent | FnDeclKind::Impl | FnDeclKind::Trait => true,
_ => false,
}
}
@@ -1229,7 +1216,11 @@
hir_id: this.lower_node_id(node_id),
body: this.lower_const_body(path_expr.span, Some(&path_expr)),
});
- return GenericArg::Const(ConstArg { value: ct, span });
+ return GenericArg::Const(ConstArg {
+ value: ct,
+ span,
+ is_desugared_from_effects: false,
+ });
}
}
}
@@ -1240,6 +1231,7 @@
ast::GenericArg::Const(ct) => GenericArg::Const(ConstArg {
value: self.lower_anon_const(&ct),
span: self.lower_span(ct.value.span),
+ is_desugared_from_effects: false,
}),
}
}
@@ -1271,7 +1263,7 @@
&PolyTraitRef {
bound_generic_params: ThinVec::new(),
trait_ref: TraitRef { path: path.clone(), ref_id: t.id },
- span: t.span
+ span: t.span,
},
itctx,
ast::Const::No,
@@ -1749,14 +1741,7 @@
}
fn lower_fn_params_to_names(&mut self, decl: &FnDecl) -> &'hir [Ident] {
- // Skip the `...` (`CVarArgs`) trailing arguments from the AST,
- // as they are not explicit in HIR/Ty function signatures.
- // (instead, the `c_variadic` flag is set to `true`)
- let mut inputs = &decl.inputs[..];
- if decl.c_variadic() {
- inputs = &inputs[..inputs.len() - 1];
- }
- self.arena.alloc_from_iter(inputs.iter().map(|param| match param.pat.kind {
+ self.arena.alloc_from_iter(decl.inputs.iter().map(|param| match param.pat.kind {
PatKind::Ident(_, ident, _) => self.lower_ident(ident),
_ => Ident::new(kw::Empty, self.lower_span(param.pat.span)),
}))
@@ -1805,53 +1790,30 @@
self.lower_ty_direct(¶m.ty, &itctx)
}));
- let output = if let Some((ret_id, span)) = make_ret_async {
- if !kind.async_fn_allowed(self.tcx) {
- match kind {
- FnDeclKind::Trait | FnDeclKind::Impl => {
- self.tcx
- .sess
- .create_feature_err(
- TraitFnAsync { fn_span, span },
- sym::async_fn_in_trait,
- )
- .emit();
- }
- _ => {
- self.tcx.sess.emit_err(TraitFnAsync { fn_span, span });
- }
- }
- }
-
+ let output = if let Some((ret_id, _span)) = make_ret_async {
let fn_def_id = self.local_def_id(fn_node_id);
- self.lower_async_fn_ret_ty(&decl.output, fn_def_id, ret_id, kind)
+ self.lower_async_fn_ret_ty(&decl.output, fn_def_id, ret_id, kind, fn_span)
} else {
match &decl.output {
FnRetTy::Ty(ty) => {
- let context = if kind.return_impl_trait_allowed(self.tcx) {
+ let context = if kind.return_impl_trait_allowed() {
let fn_def_id = self.local_def_id(fn_node_id);
ImplTraitContext::ReturnPositionOpaqueTy {
origin: hir::OpaqueTyOrigin::FnReturn(fn_def_id),
fn_kind: kind,
}
} else {
- let position = match kind {
- FnDeclKind::Fn | FnDeclKind::Inherent => {
- unreachable!("fn should allow in-band lifetimes")
+ ImplTraitContext::Disallowed(match kind {
+ FnDeclKind::Fn
+ | FnDeclKind::Inherent
+ | FnDeclKind::Trait
+ | FnDeclKind::Impl => {
+ unreachable!("fn should allow return-position impl trait in traits")
}
FnDeclKind::ExternFn => ImplTraitPosition::ExternFnReturn,
FnDeclKind::Closure => ImplTraitPosition::ClosureReturn,
FnDeclKind::Pointer => ImplTraitPosition::PointerReturn,
- FnDeclKind::Trait => ImplTraitPosition::TraitReturn,
- FnDeclKind::Impl => ImplTraitPosition::ImplReturn,
- };
- match kind {
- FnDeclKind::Trait | FnDeclKind::Impl => ImplTraitContext::FeatureGated(
- position,
- sym::return_position_impl_trait_in_trait,
- ),
- _ => ImplTraitContext::Disallowed(position),
- }
+ })
};
hir::FnRetTy::Return(self.lower_ty(ty, &context))
}
@@ -1901,8 +1863,9 @@
fn_def_id: LocalDefId,
opaque_ty_node_id: NodeId,
fn_kind: FnDeclKind,
+ fn_span: Span,
) -> hir::FnRetTy<'hir> {
- let span = self.lower_span(output.span());
+ let span = self.lower_span(fn_span);
let opaque_ty_span = self.mark_span_with_reason(DesugaringKind::Async, span, None);
let captured_lifetimes: Vec<_> = self
@@ -1923,18 +1886,9 @@
let future_bound = this.lower_async_fn_output_type_to_future_bound(
output,
span,
- if let FnDeclKind::Trait = fn_kind
- && !this.tcx.features().return_position_impl_trait_in_trait
- {
- ImplTraitContext::FeatureGated(
- ImplTraitPosition::TraitReturn,
- sym::return_position_impl_trait_in_trait,
- )
- } else {
- ImplTraitContext::ReturnPositionOpaqueTy {
- origin: hir::OpaqueTyOrigin::FnReturn(fn_def_id),
- fn_kind,
- }
+ ImplTraitContext::ReturnPositionOpaqueTy {
+ origin: hir::OpaqueTyOrigin::FnReturn(fn_def_id),
+ fn_kind,
},
);
arena_vec![this; future_bound]
@@ -2568,6 +2522,7 @@
self.args.push(hir::GenericArg::Const(hir::ConstArg {
value: hir::AnonConst { def_id, hir_id, body },
span,
+ is_desugared_from_effects: true,
}))
}
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/src/lifetime_collector.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/src/lifetime_collector.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/src/lifetime_collector.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_lowering/src/lifetime_collector.rs 2023-12-21 16:55:28.000000000 +0000
@@ -82,7 +82,8 @@
// We can sometimes encounter bare trait objects
// which are represented in AST as paths.
if let Some(partial_res) = self.resolver.get_partial_res(t.id)
- && let Some(Res::Def(DefKind::Trait | DefKind::TraitAlias, _)) = partial_res.full_res()
+ && let Some(Res::Def(DefKind::Trait | DefKind::TraitAlias, _)) =
+ partial_res.full_res()
{
self.current_binders.push(t.id);
visit::walk_ty(self, t);
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_passes/Cargo.toml rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_passes/Cargo.toml
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_passes/Cargo.toml 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_passes/Cargo.toml 2023-12-21 16:55:28.000000000 +0000
@@ -4,6 +4,7 @@
edition = "2021"
[dependencies]
+# tidy-alphabetical-start
itertools = "0.10.1"
rustc_ast = { path = "../rustc_ast" }
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
@@ -11,11 +12,11 @@
rustc_data_structures = { path = "../rustc_data_structures" }
rustc_errors = { path = "../rustc_errors" }
rustc_feature = { path = "../rustc_feature" }
-rustc_macros = { path = "../rustc_macros" }
rustc_fluent_macro = { path = "../rustc_fluent_macro" }
+rustc_macros = { path = "../rustc_macros" }
rustc_parse = { path = "../rustc_parse" }
rustc_session = { path = "../rustc_session" }
rustc_span = { path = "../rustc_span" }
rustc_target = { path = "../rustc_target" }
thin-vec = "0.2.12"
-tracing = "0.1"
+# tidy-alphabetical-end
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_passes/messages.ftl rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_passes/messages.ftl
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_passes/messages.ftl 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_passes/messages.ftl 2023-12-21 16:55:28.000000000 +0000
@@ -42,6 +42,10 @@
.async = `async` because of this
.label = {""}
+ast_passes_const_and_c_variadic = functions cannot be both `const` and C-variadic
+ .const = `const` because of this
+ .variadic = C-variadic because of this
+
ast_passes_const_without_body =
free constant item without body
.suggestion = provide a definition for the constant
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_passes/src/ast_validation.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_passes/src/ast_validation.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_passes/src/ast_validation.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_passes/src/ast_validation.rs 2023-12-21 16:55:28.000000000 +0000
@@ -52,7 +52,8 @@
/// Are we inside a trait impl?
in_trait_impl: bool,
- in_const_trait_impl: bool,
+ /// Are we inside a const trait defn or impl?
+ in_const_trait_or_impl: bool,
has_proc_macro_decls: bool,
@@ -78,11 +79,19 @@
f: impl FnOnce(&mut Self),
) {
let old = mem::replace(&mut self.in_trait_impl, is_in);
- let old_const =
- mem::replace(&mut self.in_const_trait_impl, matches!(constness, Some(Const::Yes(_))));
+ let old_const = mem::replace(
+ &mut self.in_const_trait_or_impl,
+ matches!(constness, Some(Const::Yes(_))),
+ );
f(self);
self.in_trait_impl = old;
- self.in_const_trait_impl = old_const;
+ self.in_const_trait_or_impl = old_const;
+ }
+
+ fn with_in_trait(&mut self, is_const: bool, f: impl FnOnce(&mut Self)) {
+ let old = mem::replace(&mut self.in_const_trait_or_impl, is_const);
+ f(self);
+ self.in_const_trait_or_impl = old;
}
fn with_banned_impl_trait(&mut self, f: impl FnOnce(&mut Self)) {
@@ -206,14 +215,15 @@
}
fn visit_struct_field_def(&mut self, field: &'a FieldDef) {
- if let Some(ident) = field.ident &&
- ident.name == kw::Underscore {
- self.check_unnamed_field_ty(&field.ty, ident.span);
- self.visit_vis(&field.vis);
- self.visit_ident(ident);
- self.visit_ty_common(&field.ty);
- self.walk_ty(&field.ty);
- walk_list!(self, visit_attribute, &field.attrs);
+ if let Some(ident) = field.ident
+ && ident.name == kw::Underscore
+ {
+ self.check_unnamed_field_ty(&field.ty, ident.span);
+ self.visit_vis(&field.vis);
+ self.visit_ident(ident);
+ self.visit_ty_common(&field.ty);
+ self.walk_ty(&field.ty);
+ walk_list!(self, visit_attribute, &field.attrs);
} else {
self.visit_field_def(field);
}
@@ -282,13 +292,11 @@
}
fn deny_unnamed_field(&self, field: &FieldDef) {
- if let Some(ident) = field.ident &&
- ident.name == kw::Underscore {
- self.err_handler()
- .emit_err(errors::InvalidUnnamedField {
- span: field.span,
- ident_span: ident.span
- });
+ if let Some(ident) = field.ident
+ && ident.name == kw::Underscore
+ {
+ self.err_handler()
+ .emit_err(errors::InvalidUnnamedField { span: field.span, ident_span: ident.span });
}
}
@@ -474,9 +482,36 @@
}
}
- /// Reject C-variadic type unless the function is foreign,
- /// or free and `unsafe extern "C"` semantically.
+ /// Reject invalid C-variadic types.
+ ///
+ /// C-variadics must be:
+ /// - Non-const
+ /// - Either foreign, or free and `unsafe extern "C"` semantically
fn check_c_variadic_type(&self, fk: FnKind<'a>) {
+ let variadic_spans: Vec<_> = fk
+ .decl()
+ .inputs
+ .iter()
+ .filter(|arg| matches!(arg.ty.kind, TyKind::CVarArgs))
+ .map(|arg| arg.span)
+ .collect();
+
+ if variadic_spans.is_empty() {
+ return;
+ }
+
+ if let Some(header) = fk.header() {
+ if let Const::Yes(const_span) = header.constness {
+ let mut spans = variadic_spans.clone();
+ spans.push(const_span);
+ self.err_handler().emit_err(errors::ConstAndCVariadic {
+ spans,
+ const_span,
+ variadic_spans: variadic_spans.clone(),
+ });
+ }
+ }
+
match (fk.ctxt(), fk.header()) {
(Some(FnCtxt::Foreign), _) => return,
(Some(FnCtxt::Free), Some(header)) => match header.ext {
@@ -491,11 +526,7 @@
_ => {}
};
- for Param { ty, span, .. } in &fk.decl().inputs {
- if let TyKind::CVarArgs = ty.kind {
- self.err_handler().emit_err(errors::BadCVariadic { span: *span });
- }
- }
+ self.err_handler().emit_err(errors::BadCVariadic { span: variadic_spans });
}
fn check_item_named(&self, ident: Ident, kind: &str) {
@@ -933,23 +964,26 @@
}
}
ItemKind::Trait(box Trait { is_auto, generics, bounds, items, .. }) => {
- if *is_auto == IsAuto::Yes {
- // Auto traits cannot have generics, super traits nor contain items.
- self.deny_generic_params(generics, item.ident.span);
- self.deny_super_traits(bounds, item.ident.span);
- self.deny_where_clause(&generics.where_clause, item.ident.span);
- self.deny_items(items, item.ident.span);
- }
+ let is_const_trait = attr::contains_name(&item.attrs, sym::const_trait);
+ self.with_in_trait(is_const_trait, |this| {
+ if *is_auto == IsAuto::Yes {
+ // Auto traits cannot have generics, super traits nor contain items.
+ this.deny_generic_params(generics, item.ident.span);
+ this.deny_super_traits(bounds, item.ident.span);
+ this.deny_where_clause(&generics.where_clause, item.ident.span);
+ this.deny_items(items, item.ident.span);
+ }
- // Equivalent of `visit::walk_item` for `ItemKind::Trait` that inserts a bound
- // context for the supertraits.
- self.visit_vis(&item.vis);
- self.visit_ident(item.ident);
- self.visit_generics(generics);
- self.with_tilde_const_allowed(|this| {
- walk_list!(this, visit_param_bound, bounds, BoundKind::SuperTraits)
+ // Equivalent of `visit::walk_item` for `ItemKind::Trait` that inserts a bound
+ // context for the supertraits.
+ this.visit_vis(&item.vis);
+ this.visit_ident(item.ident);
+ this.visit_generics(generics);
+ this.with_tilde_const_allowed(|this| {
+ walk_list!(this, visit_param_bound, bounds, BoundKind::SuperTraits)
+ });
+ walk_list!(this, visit_assoc_item, items, AssocCtxt::Trait);
});
- walk_list!(self, visit_assoc_item, items, AssocCtxt::Trait);
walk_list!(self, visit_attribute, &item.attrs);
return; // Avoid visiting again
}
@@ -1168,28 +1202,40 @@
(BoundKind::SuperTraits, TraitBoundModifier::Maybe) => {
self.err_handler().emit_err(errors::OptionalTraitSupertrait {
span: poly.span,
- path_str: pprust::path_to_string(&poly.trait_ref.path)
+ path_str: pprust::path_to_string(&poly.trait_ref.path),
});
}
(BoundKind::TraitObject, TraitBoundModifier::Maybe) => {
- self.err_handler().emit_err(errors::OptionalTraitObject {span: poly.span});
+ self.err_handler().emit_err(errors::OptionalTraitObject { span: poly.span });
}
- (_, TraitBoundModifier::MaybeConst) if let Some(reason) = &self.disallow_tilde_const => {
+ (_, TraitBoundModifier::MaybeConst)
+ if let Some(reason) = &self.disallow_tilde_const =>
+ {
let reason = match reason {
- DisallowTildeConstContext::TraitObject => errors::TildeConstReason::TraitObject,
- DisallowTildeConstContext::Fn(FnKind::Closure(..)) => errors::TildeConstReason::Closure,
- DisallowTildeConstContext::Fn(FnKind::Fn(_, ident, ..)) => errors::TildeConstReason::Function { ident: ident.span },
+ DisallowTildeConstContext::TraitObject => {
+ errors::TildeConstReason::TraitObject
+ }
+ DisallowTildeConstContext::Fn(FnKind::Closure(..)) => {
+ errors::TildeConstReason::Closure
+ }
+ DisallowTildeConstContext::Fn(FnKind::Fn(_, ident, ..)) => {
+ errors::TildeConstReason::Function { ident: ident.span }
+ }
};
- self.err_handler().emit_err(errors::TildeConstDisallowed {
- span: bound.span(),
- reason
- });
+ self.err_handler()
+ .emit_err(errors::TildeConstDisallowed { span: bound.span(), reason });
}
(_, TraitBoundModifier::MaybeConstMaybe) => {
- self.err_handler().emit_err(errors::OptionalConstExclusive {span: bound.span(), modifier: "?" });
+ self.err_handler().emit_err(errors::OptionalConstExclusive {
+ span: bound.span(),
+ modifier: "?",
+ });
}
(_, TraitBoundModifier::MaybeConstNegative) => {
- self.err_handler().emit_err(errors::OptionalConstExclusive {span: bound.span(), modifier: "!" });
+ self.err_handler().emit_err(errors::OptionalConstExclusive {
+ span: bound.span(),
+ modifier: "!",
+ });
}
_ => {}
}
@@ -1202,7 +1248,8 @@
{
for arg in &args.args {
if let ast::AngleBracketedArg::Constraint(constraint) = arg {
- self.err_handler().emit_err(errors::ConstraintOnNegativeBound { span: constraint.span });
+ self.err_handler()
+ .emit_err(errors::ConstraintOnNegativeBound { span: constraint.span });
}
}
}
@@ -1278,7 +1325,7 @@
let tilde_const_allowed =
matches!(fk.header(), Some(FnHeader { constness: ast::Const::Yes(_), .. }))
- || matches!(fk.ctxt(), Some(FnCtxt::Assoc(_)));
+ || matches!(fk.ctxt(), Some(FnCtxt::Assoc(_)) if self.in_const_trait_or_impl);
let disallowed = (!tilde_const_allowed).then(|| DisallowTildeConstContext::Fn(fk));
@@ -1363,7 +1410,7 @@
walk_list!(self, visit_ty, ty);
}
AssocItemKind::Fn(box Fn { sig, generics, body, .. })
- if self.in_const_trait_impl
+ if self.in_const_trait_or_impl
|| ctxt == AssocCtxt::Trait
|| matches!(sig.header.constness, Const::Yes(_)) =>
{
@@ -1395,62 +1442,54 @@
let mut err = errors::EqualityInWhere { span: predicate.span, assoc: None, assoc2: None };
// Given `::Bar = RhsTy`, suggest `A: Foo`.
- if let TyKind::Path(Some(qself), full_path) = &predicate.lhs_ty.kind {
- if let TyKind::Path(None, path) = &qself.ty.kind {
- match &path.segments[..] {
- [PathSegment { ident, args: None, .. }] => {
- for param in &generics.params {
- if param.ident == *ident {
- let param = ident;
- match &full_path.segments[qself.position..] {
- [PathSegment { ident, args, .. }] => {
- // Make a new `Path` from `foo::Bar` to `Foo`.
- let mut assoc_path = full_path.clone();
- // Remove `Bar` from `Foo::Bar`.
- assoc_path.segments.pop();
- let len = assoc_path.segments.len() - 1;
- let gen_args = args.as_deref().cloned();
- // Build ``.
- let arg = AngleBracketedArg::Constraint(AssocConstraint {
- id: rustc_ast::node_id::DUMMY_NODE_ID,
- ident: *ident,
- gen_args,
- kind: AssocConstraintKind::Equality {
- term: predicate.rhs_ty.clone().into(),
- },
- span: ident.span,
- });
- // Add `` to `Foo`.
- match &mut assoc_path.segments[len].args {
- Some(args) => match args.deref_mut() {
- GenericArgs::Parenthesized(_) => continue,
- GenericArgs::AngleBracketed(args) => {
- args.args.push(arg);
- }
- },
- empty_args => {
- *empty_args = Some(
- AngleBracketedArgs {
- span: ident.span,
- args: thin_vec![arg],
- }
- .into(),
- );
- }
- }
- err.assoc = Some(errors::AssociatedSuggestion {
- span: predicate.span,
- ident: *ident,
- param: *param,
- path: pprust::path_to_string(&assoc_path),
- })
- }
- _ => {}
- };
+ if let TyKind::Path(Some(qself), full_path) = &predicate.lhs_ty.kind
+ && let TyKind::Path(None, path) = &qself.ty.kind
+ && let [PathSegment { ident, args: None, .. }] = &path.segments[..]
+ {
+ for param in &generics.params {
+ if param.ident == *ident
+ && let [PathSegment { ident, args, .. }] = &full_path.segments[qself.position..]
+ {
+ // Make a new `Path` from `foo::Bar` to `Foo`.
+ let mut assoc_path = full_path.clone();
+ // Remove `Bar` from `Foo::Bar`.
+ assoc_path.segments.pop();
+ let len = assoc_path.segments.len() - 1;
+ let gen_args = args.as_deref().cloned();
+ // Build ``.
+ let arg = AngleBracketedArg::Constraint(AssocConstraint {
+ id: rustc_ast::node_id::DUMMY_NODE_ID,
+ ident: *ident,
+ gen_args,
+ kind: AssocConstraintKind::Equality {
+ term: predicate.rhs_ty.clone().into(),
+ },
+ span: ident.span,
+ });
+ // Add `` to `Foo`.
+ match &mut assoc_path.segments[len].args {
+ Some(args) => match args.deref_mut() {
+ GenericArgs::Parenthesized(_) => continue,
+ GenericArgs::AngleBracketed(args) => {
+ args.args.push(arg);
}
+ },
+ empty_args => {
+ *empty_args = Some(
+ AngleBracketedArgs {
+ span: ident.span,
+ args: thin_vec![arg],
+ }
+ .into(),
+ );
}
}
- _ => {}
+ err.assoc = Some(errors::AssociatedSuggestion {
+ span: predicate.span,
+ ident: *ident,
+ param: param.ident,
+ path: pprust::path_to_string(&assoc_path),
+ })
}
}
}
@@ -1510,7 +1549,7 @@
features,
extern_mod: None,
in_trait_impl: false,
- in_const_trait_impl: false,
+ in_const_trait_or_impl: false,
has_proc_macro_decls: false,
outer_impl_trait: None,
disallow_tilde_const: None,
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_passes/src/errors.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_passes/src/errors.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_passes/src/errors.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_passes/src/errors.rs 2023-12-21 16:55:28.000000000 +0000
@@ -271,7 +271,7 @@
#[diag(ast_passes_bad_c_variadic)]
pub struct BadCVariadic {
#[primary_span]
- pub span: Span,
+ pub span: Vec,
}
#[derive(Diagnostic)]
@@ -584,6 +584,17 @@
}
#[derive(Diagnostic)]
+#[diag(ast_passes_const_and_c_variadic)]
+pub struct ConstAndCVariadic {
+ #[primary_span]
+ pub spans: Vec,
+ #[label(ast_passes_const)]
+ pub const_span: Span,
+ #[label(ast_passes_variadic)]
+ pub variadic_spans: Vec,
+}
+
+#[derive(Diagnostic)]
#[diag(ast_passes_pattern_in_foreign, code = "E0130")]
pub struct PatternInForeign {
#[primary_span]
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_passes/src/feature_gate.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_passes/src/feature_gate.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_passes/src/feature_gate.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_passes/src/feature_gate.rs 2023-12-21 16:55:28.000000000 +0000
@@ -10,53 +10,54 @@
use rustc_span::Span;
use rustc_target::spec::abi;
use thin_vec::ThinVec;
-use tracing::debug;
use crate::errors;
-macro_rules! gate_feature_fn {
- ($visitor: expr, $has_feature: expr, $span: expr, $name: expr, $explain: expr, $help: expr) => {{
- let (visitor, has_feature, span, name, explain, help) =
- (&*$visitor, $has_feature, $span, $name, $explain, $help);
- let has_feature: bool = has_feature(visitor.features);
- debug!("gate_feature(feature = {:?}, span = {:?}); has? {}", name, span, has_feature);
- if !has_feature && !span.allows_unstable($name) {
- feature_err(&visitor.sess.parse_sess, name, span, explain).help(help).emit();
+/// The common case.
+macro_rules! gate {
+ ($visitor:expr, $feature:ident, $span:expr, $explain:expr) => {{
+ if !$visitor.features.$feature && !$span.allows_unstable(sym::$feature) {
+ feature_err(&$visitor.sess.parse_sess, sym::$feature, $span, $explain).emit();
}
}};
- ($visitor: expr, $has_feature: expr, $span: expr, $name: expr, $explain: expr) => {{
- let (visitor, has_feature, span, name, explain) =
- (&*$visitor, $has_feature, $span, $name, $explain);
- let has_feature: bool = has_feature(visitor.features);
- debug!("gate_feature(feature = {:?}, span = {:?}); has? {}", name, span, has_feature);
- if !has_feature && !span.allows_unstable($name) {
- feature_err(&visitor.sess.parse_sess, name, span, explain).emit();
+ ($visitor:expr, $feature:ident, $span:expr, $explain:expr, $help:expr) => {{
+ if !$visitor.features.$feature && !$span.allows_unstable(sym::$feature) {
+ feature_err(&$visitor.sess.parse_sess, sym::$feature, $span, $explain)
+ .help($help)
+ .emit();
}
}};
- (future_incompatible; $visitor: expr, $has_feature: expr, $span: expr, $name: expr, $explain: expr) => {{
- let (visitor, has_feature, span, name, explain) =
- (&*$visitor, $has_feature, $span, $name, $explain);
- let has_feature: bool = has_feature(visitor.features);
- debug!(
- "gate_feature(feature = {:?}, span = {:?}); has? {} (future_incompatible)",
- name, span, has_feature
- );
- if !has_feature && !span.allows_unstable($name) {
- feature_warn(&visitor.sess.parse_sess, name, span, explain);
+}
+
+/// The unusual case, where the `has_feature` condition is non-standard.
+macro_rules! gate_alt {
+ ($visitor:expr, $has_feature:expr, $name:expr, $span:expr, $explain:expr) => {{
+ if !$has_feature && !$span.allows_unstable($name) {
+ feature_err(&$visitor.sess.parse_sess, $name, $span, $explain).emit();
+ }
+ }};
+}
+
+/// The case involving a multispan.
+macro_rules! gate_multi {
+ ($visitor:expr, $feature:ident, $spans:expr, $explain:expr) => {{
+ if !$visitor.features.$feature {
+ let spans: Vec<_> =
+ $spans.filter(|span| !span.allows_unstable(sym::$feature)).collect();
+ if !spans.is_empty() {
+ feature_err(&$visitor.sess.parse_sess, sym::$feature, spans, $explain).emit();
+ }
}
}};
}
-macro_rules! gate_feature_post {
- ($visitor: expr, $feature: ident, $span: expr, $explain: expr, $help: expr) => {
- gate_feature_fn!($visitor, |x: &Features| x.$feature, $span, sym::$feature, $explain, $help)
- };
- ($visitor: expr, $feature: ident, $span: expr, $explain: expr) => {
- gate_feature_fn!($visitor, |x: &Features| x.$feature, $span, sym::$feature, $explain)
- };
- (future_incompatible; $visitor: expr, $feature: ident, $span: expr, $explain: expr) => {
- gate_feature_fn!(future_incompatible; $visitor, |x: &Features| x.$feature, $span, sym::$feature, $explain)
- };
+/// The legacy case.
+macro_rules! gate_legacy {
+ ($visitor:expr, $feature:ident, $span:expr, $explain:expr) => {{
+ if !$visitor.features.$feature && !$span.allows_unstable(sym::$feature) {
+ feature_warn(&$visitor.sess.parse_sess, sym::$feature, $span, $explain);
+ }
+ }};
}
pub fn check_attribute(attr: &ast::Attribute, sess: &Session, features: &Features) {
@@ -78,7 +79,7 @@
match symbol_unescaped {
// Stable
sym::Rust | sym::C => {}
- abi => gate_feature_post!(
+ abi => gate!(
&self,
const_extern_fn,
span,
@@ -129,14 +130,14 @@
fn visit_ty(&mut self, ty: &ast::Ty) {
if let ast::TyKind::ImplTrait(..) = ty.kind {
if self.in_associated_ty {
- gate_feature_post!(
+ gate!(
&self.vis,
impl_trait_in_assoc_type,
ty.span,
"`impl Trait` in associated types is unstable"
);
} else {
- gate_feature_post!(
+ gate!(
&self.vis,
type_alias_impl_trait,
ty.span,
@@ -153,23 +154,16 @@
fn check_late_bound_lifetime_defs(&self, params: &[ast::GenericParam]) {
// Check only lifetime parameters are present and that the lifetime
// parameters that are present have no bounds.
- let non_lt_param_spans: Vec<_> = params
- .iter()
- .filter_map(|param| match param.kind {
- ast::GenericParamKind::Lifetime { .. } => None,
- _ => Some(param.ident.span),
- })
- .collect();
- // FIXME: gate_feature_post doesn't really handle multispans...
- if !non_lt_param_spans.is_empty() && !self.features.non_lifetime_binders {
- feature_err(
- &self.sess.parse_sess,
- sym::non_lifetime_binders,
- non_lt_param_spans,
- crate::fluent_generated::ast_passes_forbidden_non_lifetime_param,
- )
- .emit();
- }
+ let non_lt_param_spans = params.iter().filter_map(|param| match param.kind {
+ ast::GenericParamKind::Lifetime { .. } => None,
+ _ => Some(param.ident.span),
+ });
+ gate_multi!(
+ &self,
+ non_lifetime_binders,
+ non_lt_param_spans,
+ crate::fluent_generated::ast_passes_forbidden_non_lifetime_param
+ );
for param in params {
if !param.bounds.is_empty() {
let spans: Vec<_> = param.bounds.iter().map(|b| b.span()).collect();
@@ -188,48 +182,39 @@
..
}) = attr_info
{
- gate_feature_fn!(self, has_feature, attr.span, *name, *descr);
+ gate_alt!(self, has_feature(&self.features), *name, attr.span, *descr);
}
// Check unstable flavors of the `#[doc]` attribute.
if attr.has_name(sym::doc) {
for nested_meta in attr.meta_item_list().unwrap_or_default() {
- macro_rules! gate_doc { ($($name:ident => $feature:ident)*) => {
- $(if nested_meta.has_name(sym::$name) {
- let msg = concat!("`#[doc(", stringify!($name), ")]` is experimental");
- gate_feature_post!(self, $feature, attr.span, msg);
- })*
+ macro_rules! gate_doc { ($($s:literal { $($name:ident => $feature:ident)* })*) => {
+ $($(if nested_meta.has_name(sym::$name) {
+ let msg = concat!("`#[doc(", stringify!($name), ")]` is ", $s);
+ gate!(self, $feature, attr.span, msg);
+ })*)*
}}
gate_doc!(
- cfg => doc_cfg
- cfg_hide => doc_cfg_hide
- masked => doc_masked
- notable_trait => doc_notable_trait
+ "experimental" {
+ cfg => doc_cfg
+ cfg_hide => doc_cfg_hide
+ masked => doc_masked
+ notable_trait => doc_notable_trait
+ }
+ "meant for internal use only" {
+ keyword => rustdoc_internals
+ fake_variadic => rustdoc_internals
+ }
);
-
- if nested_meta.has_name(sym::keyword) {
- let msg = "`#[doc(keyword)]` is meant for internal use only";
- gate_feature_post!(self, rustdoc_internals, attr.span, msg);
- }
-
- if nested_meta.has_name(sym::fake_variadic) {
- let msg = "`#[doc(fake_variadic)]` is meant for internal use only";
- gate_feature_post!(self, rustdoc_internals, attr.span, msg);
- }
}
}
if !attr.is_doc_comment()
- && attr.get_normal_item().path.segments.len() == 2
- && attr.get_normal_item().path.segments[0].ident.name == sym::diagnostic
+ && let [seg, _] = attr.get_normal_item().path.segments.as_slice()
+ && seg.ident.name == sym::diagnostic
&& !self.features.diagnostic_namespace
{
let msg = "`#[diagnostic]` attribute name space is experimental";
- gate_feature_post!(
- self,
- diagnostic_namespace,
- attr.get_normal_item().path.segments[0].ident.span,
- msg
- );
+ gate!(self, diagnostic_namespace, seg.ident.span, msg);
}
// Emit errors for non-staged-api crates.
@@ -255,12 +240,11 @@
ast::ItemKind::Fn(..) => {
if attr::contains_name(&i.attrs, sym::start) {
- gate_feature_post!(
+ gate!(
&self,
start,
i.span,
- "`#[start]` functions are experimental \
- and their signature may change \
+ "`#[start]` functions are experimental and their signature may change \
over time"
);
}
@@ -270,7 +254,7 @@
for attr in attr::filter_by_name(&i.attrs, sym::repr) {
for item in attr.meta_item_list().unwrap_or_else(ThinVec::new) {
if item.has_name(sym::simd) {
- gate_feature_post!(
+ gate!(
&self,
repr_simd,
attr.span,
@@ -283,7 +267,7 @@
ast::ItemKind::Impl(box ast::Impl { polarity, defaultness, of_trait, .. }) => {
if let &ast::ImplPolarity::Negative(span) = polarity {
- gate_feature_post!(
+ gate!(
&self,
negative_impls,
span.to(of_trait.as_ref().map_or(span, |t| t.path.span)),
@@ -293,12 +277,12 @@
}
if let ast::Defaultness::Default(_) = defaultness {
- gate_feature_post!(&self, specialization, i.span, "specialization is unstable");
+ gate!(&self, specialization, i.span, "specialization is unstable");
}
}
ast::ItemKind::Trait(box ast::Trait { is_auto: ast::IsAuto::Yes, .. }) => {
- gate_feature_post!(
+ gate!(
&self,
auto_traits,
i.span,
@@ -307,12 +291,12 @@
}
ast::ItemKind::TraitAlias(..) => {
- gate_feature_post!(&self, trait_alias, i.span, "trait aliases are experimental");
+ gate!(&self, trait_alias, i.span, "trait aliases are experimental");
}
ast::ItemKind::MacroDef(ast::MacroDef { macro_rules: false, .. }) => {
let msg = "`macro` is experimental";
- gate_feature_post!(&self, decl_macro, i.span, msg);
+ gate!(&self, decl_macro, i.span, msg);
}
ast::ItemKind::TyAlias(box ast::TyAlias { ty: Some(ty), .. }) => {
@@ -331,7 +315,7 @@
let link_name = attr::first_attr_value_str_by_name(&i.attrs, sym::link_name);
let links_to_llvm = link_name.is_some_and(|val| val.as_str().starts_with("llvm."));
if links_to_llvm {
- gate_feature_post!(
+ gate!(
&self,
link_llvm_intrinsics,
i.span,
@@ -340,7 +324,7 @@
}
}
ast::ForeignItemKind::TyAlias(..) => {
- gate_feature_post!(&self, extern_types, i.span, "extern types are experimental");
+ gate!(&self, extern_types, i.span, "extern types are experimental");
}
ast::ForeignItemKind::MacCall(..) => {}
}
@@ -356,7 +340,7 @@
self.check_late_bound_lifetime_defs(&bare_fn_ty.generic_params);
}
ast::TyKind::Never => {
- gate_feature_post!(&self, never_type, ty.span, "the `!` type is experimental");
+ gate!(&self, never_type, ty.span, "the `!` type is experimental");
}
_ => {}
}
@@ -389,7 +373,7 @@
fn visit_expr(&mut self, e: &'a ast::Expr) {
match e.kind {
ast::ExprKind::TryBlock(_) => {
- gate_feature_post!(&self, try_blocks, e.span, "`try` expression is experimental");
+ gate!(&self, try_blocks, e.span, "`try` expression is experimental");
}
_ => {}
}
@@ -405,7 +389,7 @@
_ => pat,
};
if let PatKind::Range(Some(_), None, Spanned { .. }) = inner_pat.kind {
- gate_feature_post!(
+ gate!(
&self,
half_open_range_patterns_in_slices,
pat.span,
@@ -415,15 +399,10 @@
}
}
PatKind::Box(..) => {
- gate_feature_post!(
- &self,
- box_patterns,
- pattern.span,
- "box pattern syntax is experimental"
- );
+ gate!(&self, box_patterns, pattern.span, "box pattern syntax is experimental");
}
PatKind::Range(_, Some(_), Spanned { node: RangeEnd::Excluded, .. }) => {
- gate_feature_post!(
+ gate!(
&self,
exclusive_range_pattern,
pattern.span,
@@ -451,7 +430,7 @@
}
if fn_kind.ctxt() != Some(FnCtxt::Foreign) && fn_kind.decl().c_variadic() {
- gate_feature_post!(&self, c_variadic, span, "C-variadic functions are unstable");
+ gate!(&self, c_variadic, span, "C-variadic functions are unstable");
}
visit::walk_fn(self, fn_kind)
@@ -463,14 +442,14 @@
&& args.inputs.is_empty()
&& matches!(args.output, ast::FnRetTy::Default(..))
{
- gate_feature_post!(
+ gate!(
&self,
return_type_notation,
constraint.span,
"return type notation is experimental"
);
} else {
- gate_feature_post!(
+ gate!(
&self,
associated_type_bounds,
constraint.span,
@@ -486,7 +465,7 @@
ast::AssocItemKind::Fn(_) => true,
ast::AssocItemKind::Type(box ast::TyAlias { ty, .. }) => {
if let (Some(_), AssocCtxt::Trait) = (ty, ctxt) {
- gate_feature_post!(
+ gate!(
&self,
associated_type_defaults,
i.span,
@@ -502,11 +481,11 @@
};
if let ast::Defaultness::Default(_) = i.kind.defaultness() {
// Limit `min_specialization` to only specializing functions.
- gate_feature_fn!(
+ gate_alt!(
&self,
- |x: &Features| x.specialization || (is_fn && x.min_specialization),
- i.span,
+ self.features.specialization || (is_fn && self.features.min_specialization),
sym::specialization,
+ i.span,
"specialization is unstable"
);
}
@@ -521,17 +500,17 @@
let spans = sess.parse_sess.gated_spans.spans.borrow();
macro_rules! gate_all {
- ($gate:ident, $msg:literal, $help:literal) => {
+ ($gate:ident, $msg:literal) => {
if let Some(spans) = spans.get(&sym::$gate) {
for span in spans {
- gate_feature_post!(&visitor, $gate, *span, $msg, $help);
+ gate!(&visitor, $gate, *span, $msg);
}
}
};
- ($gate:ident, $msg:literal) => {
+ ($gate:ident, $msg:literal, $help:literal) => {
if let Some(spans) = spans.get(&sym::$gate) {
for span in spans {
- gate_feature_post!(&visitor, $gate, *span, $msg);
+ gate!(&visitor, $gate, *span, $msg, $help);
}
}
};
@@ -554,7 +533,12 @@
"consider removing `for<...>`"
);
gate_all!(more_qualified_paths, "usage of qualified paths in this context is experimental");
- gate_all!(generators, "yield syntax is experimental");
+ for &span in spans.get(&sym::yield_expr).iter().copied().flatten() {
+ if !span.at_least_rust_2024() {
+ gate!(&visitor, coroutines, span, "yield syntax is experimental");
+ }
+ }
+ gate_all!(gen_blocks, "gen blocks are experimental");
gate_all!(raw_ref_op, "raw address of syntax is experimental");
gate_all!(const_trait_impl, "const trait impls are experimental");
gate_all!(
@@ -585,7 +569,7 @@
macro_rules! gate_all_legacy_dont_use {
($gate:ident, $msg:literal) => {
for span in spans.get(&sym::$gate).unwrap_or(&vec![]) {
- gate_feature_post!(future_incompatible; &visitor, $gate, *span, $msg);
+ gate_legacy!(&visitor, $gate, *span, $msg);
}
};
}
@@ -603,6 +587,7 @@
"exclusive range pattern syntax is experimental"
);
gate_all_legacy_dont_use!(try_blocks, "`try` blocks are unstable");
+ gate_all_legacy_dont_use!(auto_traits, "`auto` traits are unstable");
visit::walk_crate(&mut visitor, krate);
}
@@ -657,7 +642,7 @@
for (f1, f2) in rustc_feature::INCOMPATIBLE_FEATURES
.iter()
- .filter(|&&(f1, f2)| features.enabled(f1) && features.enabled(f2))
+ .filter(|&&(f1, f2)| features.active(f1) && features.active(f2))
{
if let Some((f1_name, f1_span)) = declared_features.clone().find(|(name, _)| name == f1) {
if let Some((f2_name, f2_span)) = declared_features.clone().find(|(name, _)| name == f2)
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_passes/src/lib.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_passes/src/lib.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_passes/src/lib.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_passes/src/lib.rs 2023-12-21 16:55:28.000000000 +0000
@@ -4,6 +4,9 @@
//!
//! The crate also contains other misc AST visitors, e.g. `node_count` and `show_span`.
+#![cfg_attr(not(bootstrap), allow(internal_features))]
+#![cfg_attr(not(bootstrap), doc(rust_logo))]
+#![cfg_attr(not(bootstrap), feature(rustdoc_internals))]
#![feature(box_patterns)]
#![feature(if_let_guard)]
#![feature(iter_is_partitioned)]
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_pretty/Cargo.toml rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_pretty/Cargo.toml
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_pretty/Cargo.toml 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_pretty/Cargo.toml 2023-12-21 16:55:28.000000000 +0000
@@ -3,9 +3,9 @@
version = "0.0.0"
edition = "2021"
-[lib]
-
[dependencies]
+# tidy-alphabetical-start
rustc_ast = { path = "../rustc_ast" }
rustc_span = { path = "../rustc_span" }
thin-vec = "0.2.12"
+# tidy-alphabetical-end
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_pretty/src/lib.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_pretty/src/lib.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_pretty/src/lib.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_pretty/src/lib.rs 2023-12-21 16:55:28.000000000 +0000
@@ -1,3 +1,6 @@
+#![cfg_attr(not(bootstrap), allow(internal_features))]
+#![cfg_attr(not(bootstrap), feature(rustdoc_internals))]
+#![cfg_attr(not(bootstrap), doc(rust_logo))]
#![deny(rustc::untranslatable_diagnostic)]
#![deny(rustc::diagnostic_outside_of_impl)]
#![feature(associated_type_bounds)]
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_pretty/src/pprust/state/expr.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_pretty/src/pprust/state/expr.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_pretty/src/pprust/state/expr.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_pretty/src/pprust/state/expr.rs 2023-12-21 16:55:28.000000000 +0000
@@ -445,8 +445,8 @@
self.ibox(0);
self.print_block_with_attrs(blk, attrs);
}
- ast::ExprKind::Async(capture_clause, blk) => {
- self.word_nbsp("async");
+ ast::ExprKind::Gen(capture_clause, blk, kind) => {
+ self.word_nbsp(kind.modifier());
self.print_capture_clause(*capture_clause);
// cbox/ibox in analogy to the `ExprKind::Block` arm above
self.cbox(0);
@@ -673,7 +673,7 @@
fn print_capture_clause(&mut self, capture_clause: ast::CaptureBy) {
match capture_clause {
- ast::CaptureBy::Value => self.word_space("move"),
+ ast::CaptureBy::Value { .. } => self.word_space("move"),
ast::CaptureBy::Ref => {}
}
}
@@ -684,8 +684,8 @@
for piece in pieces {
match piece {
FormatArgsPiece::Literal(s) => {
- for c in s.as_str().escape_debug() {
- template.push(c);
+ for c in s.as_str().chars() {
+ template.extend(c.escape_debug());
if let '{' | '}' = c {
template.push(c);
}
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_pretty/src/pprust/state.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_pretty/src/pprust/state.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_ast_pretty/src/pprust/state.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_ast_pretty/src/pprust/state.rs 2023-12-21 16:55:28.000000000 +0000
@@ -146,37 +146,49 @@
s.s.eof()
}
-/// This makes printed token streams look slightly nicer,
-/// and also addresses some specific regressions described in #63896 and #73345.
-fn tt_prepend_space(tt: &TokenTree, prev: &TokenTree) -> bool {
- if let TokenTree::Token(token, _) = prev {
- // No space after these tokens, e.g. `x.y`, `$e`
- // (The carets point to `prev`.) ^ ^
- if matches!(token.kind, token::Dot | token::Dollar) {
- return false;
- }
- if let token::DocComment(comment_kind, ..) = token.kind {
- return comment_kind != CommentKind::Line;
- }
- }
- match tt {
- // No space before these tokens, e.g. `foo,`, `println!`, `x.y`
- // (The carets point to `token`.) ^ ^ ^
+/// Should two consecutive tokens be printed with a space between them?
+///
+/// Note: some old proc macros parse pretty-printed output, so changes here can
+/// break old code. For example:
+/// - #63896: `#[allow(unused,` must be printed rather than `#[allow(unused ,`
+/// - #73345: `#[allow(unused)] must be printed rather than `# [allow(unused)]
+///
+fn space_between(tt1: &TokenTree, tt2: &TokenTree) -> bool {
+ use token::*;
+ use Delimiter::*;
+ use TokenTree::Delimited as Del;
+ use TokenTree::Token as Tok;
+
+ // Each match arm has one or more examples in comments. The default is to
+ // insert space between adjacent tokens, except for the cases listed in
+ // this match.
+ match (tt1, tt2) {
+ // No space after line doc comments.
+ (Tok(Token { kind: DocComment(CommentKind::Line, ..), .. }, _), _) => false,
+
+ // `.` + ANYTHING: `x.y`, `tup.0`
+ // `$` + ANYTHING: `$e`
+ (Tok(Token { kind: Dot | Dollar, .. }, _), _) => false,
+
+ // ANYTHING + `,`: `foo,`
+ // ANYTHING + `.`: `x.y`, `tup.0`
+ // ANYTHING + `!`: `foo! { ... }`
//
- // FIXME: having `Not` here works well for macro invocations like
- // `println!()`, but is bad when `!` means "logical not" or "the never
- // type", where the lack of space causes ugliness like this:
- // `Fn() ->!`, `x =! y`, `if! x { f(); }`.
- TokenTree::Token(token, _) => !matches!(token.kind, token::Comma | token::Not | token::Dot),
- // No space before parentheses if preceded by these tokens, e.g. `foo(...)`
- TokenTree::Delimited(_, Delimiter::Parenthesis, _) => {
- !matches!(prev, TokenTree::Token(Token { kind: token::Ident(..), .. }, _))
- }
- // No space before brackets if preceded by these tokens, e.g. `#[...]`
- TokenTree::Delimited(_, Delimiter::Bracket, _) => {
- !matches!(prev, TokenTree::Token(Token { kind: token::Pound, .. }, _))
- }
- TokenTree::Delimited(..) => true,
+ // FIXME: Incorrect cases:
+ // - Logical not: `x =! y`, `if! x { f(); }`
+ // - Never type: `Fn() ->!`
+ (_, Tok(Token { kind: Comma | Dot | Not, .. }, _)) => false,
+
+ // IDENT + `(`: `f(3)`
+ //
+ // FIXME: Incorrect cases:
+ // - Let: `let(a, b) = (1, 2)`
+ (Tok(Token { kind: Ident(..), .. }, _), Del(_, Parenthesis, _)) => false,
+
+ // `#` + `[`: `#[attr]`
+ (Tok(Token { kind: Pound, .. }, _), Del(_, Bracket, _)) => false,
+
+ _ => true,
}
}
@@ -575,7 +587,7 @@
while let Some(tt) = iter.next() {
self.print_tt(tt, convert_dollar_crate);
if let Some(next) = iter.peek() {
- if tt_prepend_space(next, tt) {
+ if space_between(tt, next) {
self.space();
}
}
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_attr/Cargo.toml rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_attr/Cargo.toml
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_attr/Cargo.toml 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_attr/Cargo.toml 2023-12-21 16:55:28.000000000 +0000
@@ -3,17 +3,17 @@
version = "0.0.0"
edition = "2021"
-[lib]
-
[dependencies]
+# tidy-alphabetical-start
+rustc_ast = { path = "../rustc_ast" }
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
-rustc_serialize = { path = "../rustc_serialize" }
-rustc_errors = { path = "../rustc_errors" }
-rustc_fluent_macro = { path = "../rustc_fluent_macro" }
-rustc_span = { path = "../rustc_span" }
rustc_data_structures = { path = "../rustc_data_structures" }
+rustc_errors = { path = "../rustc_errors" }
rustc_feature = { path = "../rustc_feature" }
+rustc_fluent_macro = { path = "../rustc_fluent_macro" }
rustc_lexer = { path = "../rustc_lexer" }
rustc_macros = { path = "../rustc_macros" }
+rustc_serialize = { path = "../rustc_serialize" }
rustc_session = { path = "../rustc_session" }
-rustc_ast = { path = "../rustc_ast" }
+rustc_span = { path = "../rustc_span" }
+# tidy-alphabetical-end
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_attr/messages.ftl rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_attr/messages.ftl
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_attr/messages.ftl 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_attr/messages.ftl 2023-12-21 16:55:28.000000000 +0000
@@ -58,6 +58,9 @@
attr_invalid_repr_hint_no_value =
invalid representation hint: `{$name}` does not take a value
+attr_invalid_since =
+ 'since' must be a Rust version number, such as "1.31.0"
+
attr_missing_feature =
missing 'feature'
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_attr/src/builtin.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_attr/src/builtin.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_attr/src/builtin.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_attr/src/builtin.rs 2023-12-21 16:55:28.000000000 +0000
@@ -3,13 +3,14 @@
use rustc_ast::{self as ast, attr};
use rustc_ast::{Attribute, LitKind, MetaItem, MetaItemKind, MetaItemLit, NestedMetaItem, NodeId};
use rustc_ast_pretty::pprust;
+use rustc_errors::ErrorGuaranteed;
use rustc_feature::{find_gated_cfg, is_builtin_attr_name, Features, GatedCfg};
use rustc_macros::HashStable_Generic;
use rustc_session::config::ExpectedValues;
use rustc_session::lint::builtin::UNEXPECTED_CFGS;
use rustc_session::lint::BuiltinLintDiagnostics;
use rustc_session::parse::{feature_err, ParseSess};
-use rustc_session::Session;
+use rustc_session::{RustcVersion, Session};
use rustc_span::hygiene::Transparency;
use rustc_span::{symbol::sym, symbol::Symbol, Span};
use std::num::NonZeroU32;
@@ -22,25 +23,10 @@
/// For more, see [this pull request](https://github.com/rust-lang/rust/pull/100591).
pub const VERSION_PLACEHOLDER: &str = "CURRENT_RUSTC_VERSION";
-pub fn rust_version_symbol() -> Symbol {
- let version = option_env!("CFG_RELEASE").unwrap_or("");
- Symbol::intern(&version)
-}
-
pub fn is_builtin_attr(attr: &Attribute) -> bool {
attr.is_doc_comment() || attr.ident().is_some_and(|ident| is_builtin_attr_name(ident.name))
}
-enum AttrError {
- MultipleItem(String),
- UnknownMetaItem(String, &'static [&'static str]),
- MissingSince,
- NonIdentFeature,
- MissingFeature,
- MultipleStabilityLevels,
- UnsupportedLiteral(UnsupportedLiteralReason, /* is_bytestr */ bool),
-}
-
pub(crate) enum UnsupportedLiteralReason {
Generic,
CfgString,
@@ -48,37 +34,6 @@
DeprecatedKvPair,
}
-fn handle_errors(sess: &ParseSess, span: Span, error: AttrError) {
- match error {
- AttrError::MultipleItem(item) => {
- sess.emit_err(session_diagnostics::MultipleItem { span, item });
- }
- AttrError::UnknownMetaItem(item, expected) => {
- sess.emit_err(session_diagnostics::UnknownMetaItem { span, item, expected });
- }
- AttrError::MissingSince => {
- sess.emit_err(session_diagnostics::MissingSince { span });
- }
- AttrError::NonIdentFeature => {
- sess.emit_err(session_diagnostics::NonIdentFeature { span });
- }
- AttrError::MissingFeature => {
- sess.emit_err(session_diagnostics::MissingFeature { span });
- }
- AttrError::MultipleStabilityLevels => {
- sess.emit_err(session_diagnostics::MultipleStabilityLevels { span });
- }
- AttrError::UnsupportedLiteral(reason, is_bytestr) => {
- sess.emit_err(session_diagnostics::UnsupportedLiteral {
- span,
- reason,
- is_bytestr,
- start_point_span: sess.source_map().start_point(span),
- });
- }
- }
-}
-
#[derive(Copy, Clone, PartialEq, Encodable, Decodable, Debug, HashStable_Generic)]
pub enum InlineAttr {
None,
@@ -162,7 +117,7 @@
is_soft: bool,
/// If part of a feature is stabilized and a new feature is added for the remaining parts,
/// then the `implied_by` attribute is used to indicate which now-stable feature previously
- /// contained a item.
+ /// contained an item.
///
/// ```pseudo-Rust
/// #[unstable(feature = "foo", issue = "...")]
@@ -184,13 +139,24 @@
/// `#[stable]`
Stable {
/// Rust release which stabilized this feature.
- since: Symbol,
+ since: StableSince,
/// Is this item allowed to be referred to on stable, despite being contained in unstable
/// modules?
allowed_through_unstable_modules: bool,
},
}
+/// Rust release in which a feature is stabilized.
+#[derive(Encodable, Decodable, PartialEq, Copy, Clone, Debug, Eq, Hash)]
+#[derive(HashStable_Generic)]
+pub enum StableSince {
+ Version(RustcVersion),
+ /// Stabilized in the upcoming version, whatever number that is.
+ Current,
+ /// Failed to parse a stabilization version.
+ Err,
+}
+
impl StabilityLevel {
pub fn is_unstable(&self) -> bool {
matches!(self, StabilityLevel::Unstable { .. })
@@ -241,7 +207,7 @@
sym::rustc_allowed_through_unstable_modules => allowed_through_unstable_modules = true,
sym::unstable => {
if stab.is_some() {
- handle_errors(&sess.parse_sess, attr.span, AttrError::MultipleStabilityLevels);
+ sess.emit_err(session_diagnostics::MultipleStabilityLevels { span: attr.span });
break;
}
@@ -251,7 +217,7 @@
}
sym::stable => {
if stab.is_some() {
- handle_errors(&sess.parse_sess, attr.span, AttrError::MultipleStabilityLevels);
+ sess.emit_err(session_diagnostics::MultipleStabilityLevels { span: attr.span });
break;
}
if let Some((feature, level)) = parse_stability(sess, attr) {
@@ -295,7 +261,7 @@
sym::rustc_promotable => promotable = true,
sym::rustc_const_unstable => {
if const_stab.is_some() {
- handle_errors(&sess.parse_sess, attr.span, AttrError::MultipleStabilityLevels);
+ sess.emit_err(session_diagnostics::MultipleStabilityLevels { span: attr.span });
break;
}
@@ -306,7 +272,7 @@
}
sym::rustc_const_stable => {
if const_stab.is_some() {
- handle_errors(&sess.parse_sess, attr.span, AttrError::MultipleStabilityLevels);
+ sess.emit_err(session_diagnostics::MultipleStabilityLevels { span: attr.span });
break;
}
if let Some((feature, level)) = parse_stability(sess, attr) {
@@ -340,7 +306,7 @@
for attr in attrs {
if attr.has_name(sym::rustc_default_body_unstable) {
if body_stab.is_some() {
- handle_errors(&sess.parse_sess, attr.span, AttrError::MultipleStabilityLevels);
+ sess.emit_err(session_diagnostics::MultipleStabilityLevels { span: attr.span });
break;
}
@@ -353,83 +319,83 @@
body_stab
}
+fn insert_or_error(sess: &Session, meta: &MetaItem, item: &mut Option) -> Option<()> {
+ if item.is_some() {
+ sess.emit_err(session_diagnostics::MultipleItem {
+ span: meta.span,
+ item: pprust::path_to_string(&meta.path),
+ });
+ None
+ } else if let Some(v) = meta.value_str() {
+ *item = Some(v);
+ Some(())
+ } else {
+ sess.emit_err(session_diagnostics::IncorrectMetaItem { span: meta.span });
+ None
+ }
+}
+
/// Read the content of a `stable`/`rustc_const_stable` attribute, and return the feature name and
/// its stability information.
fn parse_stability(sess: &Session, attr: &Attribute) -> Option<(Symbol, StabilityLevel)> {
let meta = attr.meta()?;
let MetaItem { kind: MetaItemKind::List(ref metas), .. } = meta else { return None };
- let insert_or_error = |meta: &MetaItem, item: &mut Option| {
- if item.is_some() {
- handle_errors(
- &sess.parse_sess,
- meta.span,
- AttrError::MultipleItem(pprust::path_to_string(&meta.path)),
- );
- return false;
- }
- if let Some(v) = meta.value_str() {
- *item = Some(v);
- true
- } else {
- sess.emit_err(session_diagnostics::IncorrectMetaItem { span: meta.span });
- false
- }
- };
let mut feature = None;
let mut since = None;
for meta in metas {
let Some(mi) = meta.meta_item() else {
- handle_errors(
- &sess.parse_sess,
- meta.span(),
- AttrError::UnsupportedLiteral(UnsupportedLiteralReason::Generic, false),
- );
+ sess.emit_err(session_diagnostics::UnsupportedLiteral {
+ span: meta.span(),
+ reason: UnsupportedLiteralReason::Generic,
+ is_bytestr: false,
+ start_point_span: sess.source_map().start_point(meta.span()),
+ });
return None;
};
match mi.name_or_empty() {
- sym::feature => {
- if !insert_or_error(mi, &mut feature) {
- return None;
- }
- }
- sym::since => {
- if !insert_or_error(mi, &mut since) {
- return None;
- }
- }
+ sym::feature => insert_or_error(sess, mi, &mut feature)?,
+ sym::since => insert_or_error(sess, mi, &mut since)?,
_ => {
- handle_errors(
- &sess.parse_sess,
- meta.span(),
- AttrError::UnknownMetaItem(
- pprust::path_to_string(&mi.path),
- &["feature", "since"],
- ),
- );
+ sess.emit_err(session_diagnostics::UnknownMetaItem {
+ span: meta.span(),
+ item: pprust::path_to_string(&mi.path),
+ expected: &["feature", "since"],
+ });
return None;
}
}
}
- if let Some(s) = since && s.as_str() == VERSION_PLACEHOLDER {
- since = Some(rust_version_symbol());
- }
+ let feature = match feature {
+ Some(feature) if rustc_lexer::is_ident(feature.as_str()) => Ok(feature),
+ Some(_bad_feature) => {
+ Err(sess.emit_err(session_diagnostics::NonIdentFeature { span: attr.span }))
+ }
+ None => Err(sess.emit_err(session_diagnostics::MissingFeature { span: attr.span })),
+ };
- match (feature, since) {
- (Some(feature), Some(since)) => {
+ let since = if let Some(since) = since {
+ if since.as_str() == VERSION_PLACEHOLDER {
+ StableSince::Current
+ } else if let Some(version) = parse_version(since) {
+ StableSince::Version(version)
+ } else {
+ sess.emit_err(session_diagnostics::InvalidSince { span: attr.span });
+ StableSince::Err
+ }
+ } else {
+ sess.emit_err(session_diagnostics::MissingSince { span: attr.span });
+ StableSince::Err
+ };
+
+ match feature {
+ Ok(feature) => {
let level = StabilityLevel::Stable { since, allowed_through_unstable_modules: false };
Some((feature, level))
}
- (None, _) => {
- handle_errors(&sess.parse_sess, attr.span, AttrError::MissingFeature);
- None
- }
- _ => {
- handle_errors(&sess.parse_sess, attr.span, AttrError::MissingSince);
- None
- }
+ Err(ErrorGuaranteed { .. }) => None,
}
}
@@ -438,23 +404,6 @@
fn parse_unstability(sess: &Session, attr: &Attribute) -> Option<(Symbol, StabilityLevel)> {
let meta = attr.meta()?;
let MetaItem { kind: MetaItemKind::List(ref metas), .. } = meta else { return None };
- let insert_or_error = |meta: &MetaItem, item: &mut Option| {
- if item.is_some() {
- handle_errors(
- &sess.parse_sess,
- meta.span,
- AttrError::MultipleItem(pprust::path_to_string(&meta.path)),
- );
- return false;
- }
- if let Some(v) = meta.value_str() {
- *item = Some(v);
- true
- } else {
- sess.emit_err(session_diagnostics::IncorrectMetaItem { span: meta.span });
- false
- }
- };
let mut feature = None;
let mut reason = None;
@@ -464,29 +413,20 @@
let mut implied_by = None;
for meta in metas {
let Some(mi) = meta.meta_item() else {
- handle_errors(
- &sess.parse_sess,
- meta.span(),
- AttrError::UnsupportedLiteral(UnsupportedLiteralReason::Generic, false),
- );
+ sess.emit_err(session_diagnostics::UnsupportedLiteral {
+ span: meta.span(),
+ reason: UnsupportedLiteralReason::Generic,
+ is_bytestr: false,
+ start_point_span: sess.source_map().start_point(meta.span()),
+ });
return None;
};
match mi.name_or_empty() {
- sym::feature => {
- if !insert_or_error(mi, &mut feature) {
- return None;
- }
- }
- sym::reason => {
- if !insert_or_error(mi, &mut reason) {
- return None;
- }
- }
+ sym::feature => insert_or_error(sess, mi, &mut feature)?,
+ sym::reason => insert_or_error(sess, mi, &mut reason)?,
sym::issue => {
- if !insert_or_error(mi, &mut issue) {
- return None;
- }
+ insert_or_error(sess, mi, &mut issue)?;
// These unwraps are safe because `insert_or_error` ensures the meta item
// is a name/value pair string literal.
@@ -515,31 +455,31 @@
}
is_soft = true;
}
- sym::implied_by => {
- if !insert_or_error(mi, &mut implied_by) {
- return None;
- }
- }
+ sym::implied_by => insert_or_error(sess, mi, &mut implied_by)?,
_ => {
- handle_errors(
- &sess.parse_sess,
- meta.span(),
- AttrError::UnknownMetaItem(
- pprust::path_to_string(&mi.path),
- &["feature", "reason", "issue", "soft", "implied_by"],
- ),
- );
+ sess.emit_err(session_diagnostics::UnknownMetaItem {
+ span: meta.span(),
+ item: pprust::path_to_string(&mi.path),
+ expected: &["feature", "reason", "issue", "soft", "implied_by"],
+ });
return None;
}
}
}
- match (feature, reason, issue) {
- (Some(feature), reason, Some(_)) => {
- if !rustc_lexer::is_ident(feature.as_str()) {
- handle_errors(&sess.parse_sess, attr.span, AttrError::NonIdentFeature);
- return None;
- }
+ let feature = match feature {
+ Some(feature) if rustc_lexer::is_ident(feature.as_str()) => Ok(feature),
+ Some(_bad_feature) => {
+ Err(sess.emit_err(session_diagnostics::NonIdentFeature { span: attr.span }))
+ }
+ None => Err(sess.emit_err(session_diagnostics::MissingFeature { span: attr.span })),
+ };
+
+ let issue =
+ issue.ok_or_else(|| sess.emit_err(session_diagnostics::MissingIssue { span: attr.span }));
+
+ match (feature, issue) {
+ (Ok(feature), Ok(_)) => {
let level = StabilityLevel::Unstable {
reason: UnstableReason::from_opt_reason(reason),
issue: issue_num,
@@ -548,14 +488,7 @@
};
Some((feature, level))
}
- (None, _, _) => {
- handle_errors(&sess.parse_sess, attr.span, AttrError::MissingFeature);
- return None;
- }
- _ => {
- sess.emit_err(session_diagnostics::MissingIssue { span: attr.span });
- return None;
- }
+ (Err(ErrorGuaranteed { .. }), _) | (_, Err(ErrorGuaranteed { .. })) => None,
}
}
@@ -587,7 +520,11 @@
UNEXPECTED_CFGS,
cfg.span,
lint_node_id,
- "unexpected `cfg` condition value",
+ if let Some(value) = cfg.value {
+ format!("unexpected `cfg` condition value: `{value}`")
+ } else {
+ format!("unexpected `cfg` condition value: (none)")
+ },
BuiltinLintDiagnostics::UnexpectedCfgValue(
(cfg.name, cfg.name_span),
cfg.value.map(|v| (v, cfg.value_span.unwrap())),
@@ -599,7 +536,7 @@
UNEXPECTED_CFGS,
cfg.span,
lint_node_id,
- "unexpected `cfg` condition name",
+ format!("unexpected `cfg` condition name: `{}`", cfg.name),
BuiltinLintDiagnostics::UnexpectedCfgName(
(cfg.name, cfg.name_span),
cfg.value.map(|v| (v, cfg.value_span.unwrap())),
@@ -627,24 +564,20 @@
}
}
-#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
-struct Version {
- major: u16,
- minor: u16,
- patch: u16,
-}
-
-fn parse_version(s: &str, allow_appendix: bool) -> Option {
- let mut components = s.split('-');
+/// Parse a rustc version number written inside string literal in an attribute,
+/// like appears in `since = "1.0.0"`. Suffixes like "-dev" and "-nightly" are
+/// not accepted in this position, unlike when parsing CFG_RELEASE.
+fn parse_version(s: Symbol) -> Option {
+ let mut components = s.as_str().split('-');
let d = components.next()?;
- if !allow_appendix && components.next().is_some() {
+ if components.next().is_some() {
return None;
}
let mut digits = d.splitn(3, '.');
let major = digits.next()?.parse().ok()?;
let minor = digits.next()?.parse().ok()?;
let patch = digits.next().unwrap_or("0").parse().ok()?;
- Some(Version { major, minor, patch })
+ Some(RustcVersion { major, minor, patch })
}
/// Evaluate a cfg-like condition (with `any` and `all`), using `eval` to
@@ -676,27 +609,27 @@
return false;
}
};
- let Some(min_version) = parse_version(min_version.as_str(), false) else {
+ let Some(min_version) = parse_version(*min_version) else {
sess.emit_warning(session_diagnostics::UnknownVersionLiteral { span: *span });
return false;
};
- let rustc_version = parse_version(env!("CFG_RELEASE"), true).unwrap();
// See https://github.com/rust-lang/rust/issues/64796#issuecomment-640851454 for details
if sess.assume_incomplete_release {
- rustc_version > min_version
+ RustcVersion::CURRENT > min_version
} else {
- rustc_version >= min_version
+ RustcVersion::CURRENT >= min_version
}
}
ast::MetaItemKind::List(mis) => {
for mi in mis.iter() {
if !mi.is_meta_item() {
- handle_errors(
- sess,
- mi.span(),
- AttrError::UnsupportedLiteral(UnsupportedLiteralReason::Generic, false),
- );
+ sess.emit_err(session_diagnostics::UnsupportedLiteral {
+ span: mi.span(),
+ reason: UnsupportedLiteralReason::Generic,
+ is_bytestr: false,
+ start_point_span: sess.source_map().start_point(mi.span()),
+ });
return false;
}
}
@@ -729,13 +662,16 @@
!eval_condition(mis[0].meta_item().unwrap(), sess, features, eval)
}
sym::target => {
- if let Some(features) = features && !features.cfg_target_compact {
+ if let Some(features) = features
+ && !features.cfg_target_compact
+ {
feature_err(
sess,
sym::cfg_target_compact,
cfg.span,
- "compact `cfg(target(..))` is experimental and subject to change"
- ).emit();
+ "compact `cfg(target(..))` is experimental and subject to change",
+ )
+ .emit();
}
mis.iter().fold(true, |res, mi| {
@@ -761,14 +697,12 @@
true
}
MetaItemKind::NameValue(lit) if !lit.kind.is_str() => {
- handle_errors(
- sess,
- lit.span,
- AttrError::UnsupportedLiteral(
- UnsupportedLiteralReason::CfgString,
- lit.kind.is_bytestr(),
- ),
- );
+ sess.emit_err(session_diagnostics::UnsupportedLiteral {
+ span: lit.span,
+ reason: UnsupportedLiteralReason::CfgString,
+ is_bytestr: lit.kind.is_bytestr(),
+ start_point_span: sess.source_map().start_point(lit.span),
+ });
true
}
ast::MetaItemKind::Word | ast::MetaItemKind::NameValue(..) => {
@@ -786,17 +720,49 @@
#[derive(Copy, Debug, Encodable, Decodable, Clone, HashStable_Generic)]
pub struct Deprecation {
- pub since: Option,
+ pub since: DeprecatedSince,
/// The note to issue a reason.
pub note: Option,
/// A text snippet used to completely replace any use of the deprecated item in an expression.
///
/// This is currently unstable.
pub suggestion: Option,
+}
+
+/// Release in which an API is deprecated.
+#[derive(Copy, Debug, Encodable, Decodable, Clone, HashStable_Generic)]
+pub enum DeprecatedSince {
+ RustcVersion(RustcVersion),
+ /// Deprecated in the future ("to be determined").
+ Future,
+ /// `feature(staged_api)` is off. Deprecation versions outside the standard
+ /// library are allowed to be arbitrary strings, for better or worse.
+ NonStandard(Symbol),
+ /// Deprecation version is unspecified but optional.
+ Unspecified,
+ /// Failed to parse a deprecation version, or the deprecation version is
+ /// unspecified and required. An error has already been emitted.
+ Err,
+}
+
+impl Deprecation {
+ /// Whether an item marked with #[deprecated(since = "X")] is currently
+ /// deprecated (i.e., whether X is not greater than the current rustc
+ /// version).
+ pub fn is_in_effect(&self) -> bool {
+ match self.since {
+ DeprecatedSince::RustcVersion(since) => since <= RustcVersion::CURRENT,
+ DeprecatedSince::Future => false,
+ // The `since` field doesn't have semantic purpose without `#![staged_api]`.
+ DeprecatedSince::NonStandard(_) => true,
+ // Assume deprecation is in effect if "since" field is absent or invalid.
+ DeprecatedSince::Unspecified | DeprecatedSince::Err => true,
+ }
+ }
- /// Whether to treat the since attribute as being a Rust version identifier
- /// (rather than an opaque string).
- pub is_since_rustc_version: bool,
+ pub fn is_since_rustc_version(&self) -> bool {
+ matches!(self.since, DeprecatedSince::RustcVersion(_))
+ }
}
/// Finds the deprecation attribute. `None` if none exists.
@@ -825,11 +791,10 @@
MetaItemKind::List(list) => {
let get = |meta: &MetaItem, item: &mut Option| {
if item.is_some() {
- handle_errors(
- &sess.parse_sess,
- meta.span,
- AttrError::MultipleItem(pprust::path_to_string(&meta.path)),
- );
+ sess.emit_err(session_diagnostics::MultipleItem {
+ span: meta.span,
+ item: pprust::path_to_string(&meta.path),
+ });
return false;
}
if let Some(v) = meta.value_str() {
@@ -837,16 +802,14 @@
true
} else {
if let Some(lit) = meta.name_value_literal() {
- handle_errors(
- &sess.parse_sess,
- lit.span,
- AttrError::UnsupportedLiteral(
- UnsupportedLiteralReason::DeprecatedString,
- lit.kind.is_bytestr(),
- ),
- );
+ sess.emit_err(session_diagnostics::UnsupportedLiteral {
+ span: lit.span,
+ reason: UnsupportedLiteralReason::DeprecatedString,
+ is_bytestr: lit.kind.is_bytestr(),
+ start_point_span: sess.source_map().start_point(lit.span),
+ });
} else {
- sess.emit_err(session_diagnostics::IncorrectMetaItem2 {
+ sess.emit_err(session_diagnostics::IncorrectMetaItem {
span: meta.span,
});
}
@@ -882,30 +845,25 @@
}
}
_ => {
- handle_errors(
- &sess.parse_sess,
- meta.span(),
- AttrError::UnknownMetaItem(
- pprust::path_to_string(&mi.path),
- if features.deprecated_suggestion {
- &["since", "note", "suggestion"]
- } else {
- &["since", "note"]
- },
- ),
- );
+ sess.emit_err(session_diagnostics::UnknownMetaItem {
+ span: meta.span(),
+ item: pprust::path_to_string(&mi.path),
+ expected: if features.deprecated_suggestion {
+ &["since", "note", "suggestion"]
+ } else {
+ &["since", "note"]
+ },
+ });
continue 'outer;
}
},
NestedMetaItem::Lit(lit) => {
- handle_errors(
- &sess.parse_sess,
- lit.span,
- AttrError::UnsupportedLiteral(
- UnsupportedLiteralReason::DeprecatedKvPair,
- false,
- ),
- );
+ sess.emit_err(session_diagnostics::UnsupportedLiteral {
+ span: lit.span,
+ reason: UnsupportedLiteralReason::DeprecatedKvPair,
+ is_bytestr: false,
+ start_point_span: sess.source_map().start_point(lit.span),
+ });
continue 'outer;
}
}
@@ -913,22 +871,30 @@
}
}
- if is_rustc {
- if since.is_none() {
- handle_errors(&sess.parse_sess, attr.span, AttrError::MissingSince);
- continue;
+ let since = if let Some(since) = since {
+ if since.as_str() == "TBD" {
+ DeprecatedSince::Future
+ } else if !is_rustc {
+ DeprecatedSince::NonStandard(since)
+ } else if let Some(version) = parse_version(since) {
+ DeprecatedSince::RustcVersion(version)
+ } else {
+ sess.emit_err(session_diagnostics::InvalidSince { span: attr.span });
+ DeprecatedSince::Err
}
+ } else if is_rustc {
+ sess.emit_err(session_diagnostics::MissingSince { span: attr.span });
+ DeprecatedSince::Err
+ } else {
+ DeprecatedSince::Unspecified
+ };
- if note.is_none() {
- sess.emit_err(session_diagnostics::MissingNote { span: attr.span });
- continue;
- }
+ if is_rustc && note.is_none() {
+ sess.emit_err(session_diagnostics::MissingNote { span: attr.span });
+ continue;
}
- depr = Some((
- Deprecation { since, note, suggestion, is_since_rustc_version: is_rustc },
- attr.span,
- ));
+ depr = Some((Deprecation { since, note, suggestion }, attr.span));
}
depr
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_attr/src/lib.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_attr/src/lib.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_attr/src/lib.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_attr/src/lib.rs 2023-12-21 16:55:28.000000000 +0000
@@ -4,6 +4,9 @@
//! The goal is to move the definition of `MetaItem` and things that don't need to be in `syntax`
//! to this crate.
+#![cfg_attr(not(bootstrap), allow(internal_features))]
+#![cfg_attr(not(bootstrap), feature(rustdoc_internals))]
+#![cfg_attr(not(bootstrap), doc(rust_logo))]
#![feature(let_chains)]
#![deny(rustc::untranslatable_diagnostic)]
#![deny(rustc::diagnostic_outside_of_impl)]
@@ -24,6 +27,6 @@
pub use rustc_ast::attr::*;
-pub(crate) use rustc_ast::HashStableContext;
+pub(crate) use rustc_session::HashStableContext;
fluent_messages! { "../messages.ftl" }
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_attr/src/session_diagnostics.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_attr/src/session_diagnostics.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_attr/src/session_diagnostics.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_attr/src/session_diagnostics.rs 2023-12-21 16:55:28.000000000 +0000
@@ -165,15 +165,6 @@
pub span: Span,
}
-// FIXME: This diagnostic is identical to `IncorrectMetaItem`, barring the error code. Consider
-// changing this to `IncorrectMetaItem`. See #51489.
-#[derive(Diagnostic)]
-#[diag(attr_incorrect_meta_item, code = "E0551")]
-pub(crate) struct IncorrectMetaItem2 {
- #[primary_span]
- pub span: Span,
-}
-
// FIXME: Why is this the same error code as `InvalidReprHintNoParen` and `InvalidReprHintNoValue`?
// It is more similar to `IncorrectReprFormatGeneric`.
#[derive(Diagnostic)]
@@ -380,6 +371,13 @@
}
#[derive(Diagnostic)]
+#[diag(attr_invalid_since)]
+pub(crate) struct InvalidSince {
+ #[primary_span]
+ pub span: Span,
+}
+
+#[derive(Diagnostic)]
#[diag(attr_soft_no_args)]
pub(crate) struct SoftNoArgs {
#[primary_span]
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/Cargo.toml rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/Cargo.toml
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/Cargo.toml 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/Cargo.toml 2023-12-21 16:55:28.000000000 +0000
@@ -4,11 +4,16 @@
edition = "2021"
[dependencies]
+# tidy-alphabetical-start
icu_list = "1.2"
icu_locid = "1.2"
+icu_locid_transform = "1.3.2"
icu_provider = "1.2"
icu_provider_adapters = "1.2"
-zerovec = "0.9.4"
+zerovec = "0.10.0"
+# tidy-alphabetical-end
[features]
+# tidy-alphabetical-start
rustc_use_parallel_compiler = ['icu_provider/sync']
+# tidy-alphabetical-end
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/likelysubtags_v1/mod.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/likelysubtags_v1/mod.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/likelysubtags_v1/mod.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/likelysubtags_v1/mod.rs 1970-01-01 00:00:00.000000000 +0000
@@ -1,6 +0,0 @@
-// @generated
-type DataStruct = < :: icu_provider_adapters :: fallback :: provider :: LocaleFallbackLikelySubtagsV1Marker as :: icu_provider :: DataMarker > :: Yokeable ;
-pub fn lookup(locale: &icu_provider::DataLocale) -> Option<&'static DataStruct> {
- locale.is_empty().then(|| &UND)
-}
-static UND: DataStruct = include!("und.rs.data");
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/likelysubtags_v1/und.rs.data rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/likelysubtags_v1/und.rs.data
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/likelysubtags_v1/und.rs.data 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/likelysubtags_v1/und.rs.data 1970-01-01 00:00:00.000000000 +0000
@@ -1,66 +0,0 @@
-::icu_provider_adapters::fallback::provider::LocaleFallbackLikelySubtagsV1 {
- l2s: unsafe {
- #[allow(unused_unsafe)]
- ::zerovec::ZeroMap::from_parts_unchecked(
- unsafe {
- :: zerovec :: ZeroVec :: from_bytes_unchecked (b"am\0ar\0as\0be\0bg\0bgcbhobn\0brxchrcv\0doiel\0fa\0gu\0he\0hi\0hy\0ja\0ka\0kk\0km\0kn\0ko\0kokks\0ky\0lo\0maimk\0ml\0mn\0mnimr\0my\0ne\0or\0pa\0ps\0rajru\0sa\0satsd\0si\0sr\0ta\0te\0tg\0th\0ti\0tt\0uk\0ur\0yuezh\0")
- },
- unsafe {
- :: zerovec :: ZeroVec :: from_bytes_unchecked (b"EthiArabBengCyrlCyrlDevaDevaBengDevaCherCyrlDevaGrekArabGujrHebrDevaArmnJpanGeorCyrlKhmrKndaKoreDevaArabCyrlLaooDevaCyrlMlymCyrlBengDevaMymrDevaOryaGuruArabDevaCyrlDevaOlckArabSinhCyrlTamlTeluCyrlThaiEthiCyrlCyrlArabHantHans")
- },
- )
- },
- lr2s: unsafe {
- #[allow(unused_unsafe)]
- ::zerovec::ZeroMap2d::from_parts_unchecked(
- unsafe {
- ::zerovec::ZeroVec::from_bytes_unchecked(
- b"az\0ha\0kk\0ky\0mn\0ms\0pa\0sd\0sr\0tg\0uz\0yuezh\0",
- )
- },
- unsafe {
- :: zerovec :: ZeroVec :: from_bytes_unchecked (b"\x03\0\0\0\x05\0\0\0\t\0\0\0\x0B\0\0\0\x0C\0\0\0\r\0\0\0\x0E\0\0\0\x0F\0\0\0\x13\0\0\0\x14\0\0\0\x16\0\0\0\x17\0\0\0&\0\0\0")
- },
- unsafe {
- :: zerovec :: ZeroVec :: from_bytes_unchecked (b"IQ\0IR\0RU\0CM\0SD\0AF\0CN\0IR\0MN\0CN\0TR\0CN\0CC\0PK\0IN\0ME\0RO\0RU\0TR\0PK\0AF\0CN\0CN\0AU\0BN\0GB\0GF\0HK\0ID\0MO\0PA\0PF\0PH\0SR\0TH\0TW\0US\0VN\0")
- },
- unsafe {
- :: zerovec :: ZeroVec :: from_bytes_unchecked (b"ArabArabCyrlArabArabArabArabArabArabArabLatnMongArabArabDevaLatnLatnLatnLatnArabArabCyrlHansHantHantHantHantHantHantHantHantHantHantHantHantHantHantHant")
- },
- )
- },
- l2r: unsafe {
- #[allow(unused_unsafe)]
- ::zerovec::ZeroMap::from_parts_unchecked(
- unsafe {
- :: zerovec :: ZeroVec :: from_bytes_unchecked (b"af\0am\0ar\0as\0astaz\0be\0bg\0bgcbhobn\0br\0brxbs\0ca\0cebchrcs\0cv\0cy\0da\0de\0doidsbel\0en\0es\0et\0eu\0fa\0ff\0fi\0filfo\0fr\0ga\0gd\0gl\0gu\0ha\0he\0hi\0hr\0hsbhu\0hy\0ia\0id\0ig\0is\0it\0ja\0jv\0ka\0keakgpkk\0km\0kn\0ko\0kokks\0ky\0lo\0lt\0lv\0maimi\0mk\0ml\0mn\0mnimr\0ms\0my\0ne\0nl\0nn\0no\0or\0pa\0pcmpl\0ps\0pt\0qu\0rajrm\0ro\0ru\0sa\0satsc\0sd\0si\0sk\0sl\0so\0sq\0sr\0su\0sv\0sw\0ta\0te\0tg\0th\0ti\0tk\0to\0tr\0tt\0uk\0ur\0uz\0vi\0wo\0xh\0yo\0yrlyuezh\0zu\0")
- },
- unsafe {
- :: zerovec :: ZeroVec :: from_bytes_unchecked (b"ZA\0ET\0EG\0IN\0ES\0AZ\0BY\0BG\0IN\0IN\0BD\0FR\0IN\0BA\0ES\0PH\0US\0CZ\0RU\0GB\0DK\0DE\0IN\0DE\0GR\0US\0ES\0EE\0ES\0IR\0SN\0FI\0PH\0FO\0FR\0IE\0GB\0ES\0IN\0NG\0IL\0IN\0HR\0DE\0HU\0AM\x00001ID\0NG\0IS\0IT\0JP\0ID\0GE\0CV\0BR\0KZ\0KH\0IN\0KR\0IN\0IN\0KG\0LA\0LT\0LV\0IN\0NZ\0MK\0IN\0MN\0IN\0IN\0MY\0MM\0NP\0NL\0NO\0NO\0IN\0IN\0NG\0PL\0AF\0BR\0PE\0IN\0CH\0RO\0RU\0IN\0IN\0IT\0PK\0LK\0SK\0SI\0SO\0AL\0RS\0ID\0SE\0TZ\0IN\0IN\0TJ\0TH\0ET\0TM\0TO\0TR\0RU\0UA\0PK\0UZ\0VN\0SN\0ZA\0NG\0BR\0HK\0CN\0ZA\0")
- },
- )
- },
- ls2r: unsafe {
- #[allow(unused_unsafe)]
- ::zerovec::ZeroMap2d::from_parts_unchecked(
- unsafe {
- ::zerovec::ZeroVec::from_bytes_unchecked(
- b"az\0en\0ff\0kk\0ky\0mn\0pa\0sd\0tg\0uz\0yuezh\0",
- )
- },
- unsafe {
- :: zerovec :: ZeroVec :: from_bytes_unchecked (b"\x01\0\0\0\x02\0\0\0\x03\0\0\0\x04\0\0\0\x06\0\0\0\x07\0\0\0\x08\0\0\0\x0B\0\0\0\x0C\0\0\0\r\0\0\0\x0E\0\0\0\x11\0\0\0")
- },
- unsafe {
- ::zerovec::ZeroVec::from_bytes_unchecked(
- b"ArabShawAdlmArabArabLatnMongArabDevaKhojSindArabArabHansBopoHanbHant",
- )
- },
- unsafe {
- ::zerovec::ZeroVec::from_bytes_unchecked(
- b"IR\0GB\0GN\0CN\0CN\0TR\0CN\0PK\0IN\0IN\0IN\0PK\0AF\0CN\0TW\0TW\0TW\0",
- )
- },
- )
- },
-}
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/mod.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/mod.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/mod.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/mod.rs 1970-01-01 00:00:00.000000000 +0000
@@ -1,4 +0,0 @@
-// @generated
-pub mod likelysubtags_v1;
-pub mod parents_v1;
-pub mod supplement;
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/parents_v1/mod.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/parents_v1/mod.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/parents_v1/mod.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/parents_v1/mod.rs 1970-01-01 00:00:00.000000000 +0000
@@ -1,6 +0,0 @@
-// @generated
-type DataStruct = < :: icu_provider_adapters :: fallback :: provider :: LocaleFallbackParentsV1Marker as :: icu_provider :: DataMarker > :: Yokeable ;
-pub fn lookup(locale: &icu_provider::DataLocale) -> Option<&'static DataStruct> {
- locale.is_empty().then(|| &UND)
-}
-static UND: DataStruct = include!("und.rs.data");
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/parents_v1/und.rs.data rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/parents_v1/und.rs.data
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/parents_v1/und.rs.data 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/parents_v1/und.rs.data 1970-01-01 00:00:00.000000000 +0000
@@ -1,13 +0,0 @@
-::icu_provider_adapters::fallback::provider::LocaleFallbackParentsV1 {
- parents: unsafe {
- #[allow(unused_unsafe)]
- ::zerovec::ZeroMap::from_parts_unchecked(
- unsafe {
- :: zerovec :: VarZeroVec :: from_bytes_unchecked (b"\x84\0\0\0\0\0\x06\0\x0B\0\x10\0\x15\0\x1A\0\x1F\0$\0)\0.\x003\08\0=\0B\0G\0L\0Q\0V\0[\0`\0e\0j\0o\0t\0y\0~\0\x83\0\x88\0\x8D\0\x92\0\x97\0\x9C\0\xA1\0\xA6\0\xAB\0\xB0\0\xB5\0\xBA\0\xBF\0\xC4\0\xC9\0\xCE\0\xD3\0\xD8\0\xDD\0\xE2\0\xE7\0\xEC\0\xF1\0\xF6\0\xFB\0\0\x01\x05\x01\n\x01\x0F\x01\x14\x01\x19\x01\x1E\x01#\x01(\x01-\x012\x017\x01<\x01A\x01F\x01K\x01P\x01U\x01Z\x01_\x01d\x01i\x01n\x01s\x01x\x01}\x01\x82\x01\x87\x01\x8C\x01\x91\x01\x96\x01\x9B\x01\xA0\x01\xA5\x01\xAA\x01\xAF\x01\xB4\x01\xB9\x01\xBE\x01\xC3\x01\xC8\x01\xCD\x01\xD2\x01\xD7\x01\xDC\x01\xE1\x01\xE6\x01\xEB\x01\xF0\x01\xF5\x01\xFA\x01\xFF\x01\x04\x02\t\x02\x0E\x02\x13\x02\x18\x02\x1D\x02\"\x02'\x02,\x021\x026\x02;\x02@\x02G\x02I\x02K\x02M\x02R\x02W\x02\\\x02a\x02f\x02k\x02p\x02u\x02z\x02\x7F\x02\x84\x02\x89\x02en-150en-AGen-AIen-ATen-AUen-BBen-BEen-BMen-BSen-BWen-BZen-CCen-CHen-CKen-CMen-CXen-CYen-DEen-DGen-DKen-DMen-ERen-FIen-FJen-FKen-FMen-GBen-GDen-GGen-GHen-GIen-GMen-GYen-HKen-IEen-ILen-IMen-INen-IOen-JEen-JMen-KEen-KIen-KNen-KYen-LCen-LRen-LSen-MGen-MOen-MSen-MTen-MUen-MVen-MWen-MYen-NAen-NFen-NGen-NLen-NRen-NUen-NZen-PGen-PKen-PNen-PWen-RWen-SBen-SCen-SDen-SEen-SGen-SHen-SIen-SLen-SSen-SXen-SZen-TCen-TKen-TOen-TTen-TVen-TZen-UGen-VCen-VGen-VUen-WSen-ZAen-ZMen-ZWes-ARes-BOes-BRes-BZes-CLes-COes-CRes-CUes-DOes-ECes-GTes-HNes-MXes-NIes-PAes-PEes-PRes-PYes-SVes-USes-UYes-VEhi-Latnhtnbnnno-NOpt-AOpt-CHpt-CVpt-FRpt-GQpt-GWpt-LUpt-MOpt-MZpt-STpt-TLzh-Hant-MO")
- },
- unsafe {
- :: zerovec :: ZeroVec :: from_bytes_unchecked (b"en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01150en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01150en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01150en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01150en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01150en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01150en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01150en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01150en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01150en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419en\0\0\0\0\0\0\x01IN\0fr\0\0\0\0\0\0\x01HT\0no\0\0\0\0\0\0\0\0\0\0no\0\0\0\0\0\0\0\0\0\0no\0\0\0\0\0\0\0\0\0\0pt\0\0\0\0\0\0\x01PT\0pt\0\0\0\0\0\0\x01PT\0pt\0\0\0\0\0\0\x01PT\0pt\0\0\0\0\0\0\x01PT\0pt\0\0\0\0\0\0\x01PT\0pt\0\0\0\0\0\0\x01PT\0pt\0\0\0\0\0\0\x01PT\0pt\0\0\0\0\0\0\x01PT\0pt\0\0\0\0\0\0\x01PT\0pt\0\0\0\0\0\0\x01PT\0pt\0\0\0\0\0\0\x01PT\0zh\0\x01Hant\x01HK\0")
- },
- )
- },
-}
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/supplement/co_v1/mod.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/supplement/co_v1/mod.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/supplement/co_v1/mod.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/supplement/co_v1/mod.rs 1970-01-01 00:00:00.000000000 +0000
@@ -1,6 +0,0 @@
-// @generated
-type DataStruct = < :: icu_provider_adapters :: fallback :: provider :: CollationFallbackSupplementV1Marker as :: icu_provider :: DataMarker > :: Yokeable ;
-pub fn lookup(locale: &icu_provider::DataLocale) -> Option<&'static DataStruct> {
- locale.is_empty().then(|| &UND)
-}
-static UND: DataStruct = include!("und.rs.data");
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/supplement/co_v1/und.rs.data rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/supplement/co_v1/und.rs.data
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/supplement/co_v1/und.rs.data 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/supplement/co_v1/und.rs.data 1970-01-01 00:00:00.000000000 +0000
@@ -1,22 +0,0 @@
-::icu_provider_adapters::fallback::provider::LocaleFallbackSupplementV1 {
- parents: unsafe {
- #[allow(unused_unsafe)]
- ::zerovec::ZeroMap::from_parts_unchecked(
- unsafe { ::zerovec::VarZeroVec::from_bytes_unchecked(b"\x01\0\0\0\0\0yue") },
- unsafe { ::zerovec::ZeroVec::from_bytes_unchecked(b"zh\0\x01Hant\0\0\0\0") },
- )
- },
- unicode_extension_defaults: unsafe {
- #[allow(unused_unsafe)]
- ::zerovec::ZeroMap2d::from_parts_unchecked(
- unsafe { ::zerovec::ZeroVec::from_bytes_unchecked(b"co") },
- unsafe { ::zerovec::ZeroVec::from_bytes_unchecked(b"\x02\0\0\0") },
- unsafe {
- ::zerovec::VarZeroVec::from_bytes_unchecked(b"\x02\0\0\0\0\0\x02\0zhzh-Hant")
- },
- unsafe {
- ::zerovec::VarZeroVec::from_bytes_unchecked(b"\x02\0\0\0\0\0\x06\0pinyinstroke")
- },
- )
- },
-}
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/supplement/mod.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/supplement/mod.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/supplement/mod.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/fallback/supplement/mod.rs 1970-01-01 00:00:00.000000000 +0000
@@ -1,2 +0,0 @@
-// @generated
-pub mod co_v1;
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/en.rs.data rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/en.rs.data
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/en.rs.data 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/en.rs.data 1970-01-01 00:00:00.000000000 +0000
@@ -1,50 +0,0 @@
-::icu_list::provider::ListFormatterPatternsV1([
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", and ", 6u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" and ", 5u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", & ", 4u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" & ", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
-])
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/es.rs.data rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/es.rs.data
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/es.rs.data 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/es.rs.data 1970-01-01 00:00:00.000000000 +0000
@@ -1,116 +0,0 @@
-::icu_list::provider::ListFormatterPatternsV1([
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" y ", 3u8),
- special_case: Some(::icu_list::provider::SpecialCasePattern {
- condition: unsafe {
- ::icu_list::provider::SerdeDFA::from_dfa_bytes_unchecked(
- if cfg!(target_endian = "little") {
- b"rust-regex-automata-dfa-sparse\0\0\xFF\xFE\0\0\x02\0\0\0\0\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B(\x01\0\0\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xDD\0\0\0\0\0\0\0\0\x04\0\0\0\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#\0\0\0"
- } else {
- b"rust-regex-automata-dfa-sparse\0\0\0\0\xFE\xFF\0\0\0\x02\0\0\0\0\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\0\0\x01(\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xDD\0\0\0\0\0\0\0\0\0\0\0\x04\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\0\0\0#\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#"
- },
- )
- },
- pattern: ::icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8),
- }),
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" y ", 3u8),
- special_case: Some(::icu_list::provider::SpecialCasePattern {
- condition: unsafe {
- ::icu_list::provider::SerdeDFA::from_dfa_bytes_unchecked(
- if cfg!(target_endian = "little") {
- b"rust-regex-automata-dfa-sparse\0\0\xFF\xFE\0\0\x02\0\0\0\0\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B(\x01\0\0\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xDD\0\0\0\0\0\0\0\0\x04\0\0\0\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#\0\0\0"
- } else {
- b"rust-regex-automata-dfa-sparse\0\0\0\0\xFE\xFF\0\0\0\x02\0\0\0\0\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\0\0\x01(\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xDD\0\0\0\0\0\0\0\0\0\0\0\x04\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\0\0\0#\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#"
- },
- )
- },
- pattern: ::icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8),
- }),
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" y ", 3u8),
- special_case: Some(::icu_list::provider::SpecialCasePattern {
- condition: unsafe {
- ::icu_list::provider::SerdeDFA::from_dfa_bytes_unchecked(
- if cfg!(target_endian = "little") {
- b"rust-regex-automata-dfa-sparse\0\0\xFF\xFE\0\0\x02\0\0\0\0\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B(\x01\0\0\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xDD\0\0\0\0\0\0\0\0\x04\0\0\0\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#\0\0\0"
- } else {
- b"rust-regex-automata-dfa-sparse\0\0\0\0\xFE\xFF\0\0\0\x02\0\0\0\0\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\0\0\x01(\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xDD\0\0\0\0\0\0\0\0\0\0\0\x04\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\0\0\0#\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#"
- },
- )
- },
- pattern: ::icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8),
- }),
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" y ", 3u8),
- special_case: Some(::icu_list::provider::SpecialCasePattern {
- condition: unsafe {
- ::icu_list::provider::SerdeDFA::from_dfa_bytes_unchecked(
- if cfg!(target_endian = "little") {
- b"rust-regex-automata-dfa-sparse\0\0\xFF\xFE\0\0\x02\0\0\0\0\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B(\x01\0\0\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xDD\0\0\0\0\0\0\0\0\x04\0\0\0\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#\0\0\0"
- } else {
- b"rust-regex-automata-dfa-sparse\0\0\0\0\xFE\xFF\0\0\0\x02\0\0\0\0\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\0\0\x01(\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xDD\0\0\0\0\0\0\0\0\0\0\0\x04\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\0\0\0#\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#"
- },
- )
- },
- pattern: ::icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8),
- }),
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" y ", 3u8),
- special_case: Some(::icu_list::provider::SpecialCasePattern {
- condition: unsafe {
- ::icu_list::provider::SerdeDFA::from_dfa_bytes_unchecked(
- if cfg!(target_endian = "little") {
- b"rust-regex-automata-dfa-sparse\0\0\xFF\xFE\0\0\x02\0\0\0\0\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B(\x01\0\0\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xDD\0\0\0\0\0\0\0\0\x04\0\0\0\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#\0\0\0"
- } else {
- b"rust-regex-automata-dfa-sparse\0\0\0\0\xFE\xFF\0\0\0\x02\0\0\0\0\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\0\0\x01(\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xDD\0\0\0\0\0\0\0\0\0\0\0\x04\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\0\0\0#\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#"
- },
- )
- },
- pattern: ::icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8),
- }),
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" y ", 3u8),
- special_case: Some(::icu_list::provider::SpecialCasePattern {
- condition: unsafe {
- ::icu_list::provider::SerdeDFA::from_dfa_bytes_unchecked(
- if cfg!(target_endian = "little") {
- b"rust-regex-automata-dfa-sparse\0\0\xFF\xFE\0\0\x02\0\0\0\0\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B(\x01\0\0\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xDD\0\0\0\0\0\0\0\0\x04\0\0\0\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#\0\0\0"
- } else {
- b"rust-regex-automata-dfa-sparse\0\0\0\0\xFE\xFF\0\0\0\x02\0\0\0\0\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\0\0\x01(\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xDD\0\0\0\0\0\0\0\0\0\0\0\x04\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\0\0\0#\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#"
- },
- )
- },
- pattern: ::icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8),
- }),
- },
-])
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/fr.rs.data rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/fr.rs.data
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/fr.rs.data 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/fr.rs.data 1970-01-01 00:00:00.000000000 +0000
@@ -1,50 +0,0 @@
-::icu_list::provider::ListFormatterPatternsV1([
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" et ", 4u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" et ", 4u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" et ", 4u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" et ", 4u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
-])
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/it.rs.data rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/it.rs.data
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/it.rs.data 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/it.rs.data 1970-01-01 00:00:00.000000000 +0000
@@ -1,50 +0,0 @@
-::icu_list::provider::ListFormatterPatternsV1([
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8),
- special_case: None,
- },
-])
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/ja.rs.data rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/ja.rs.data
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/ja.rs.data 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/ja.rs.data 1970-01-01 00:00:00.000000000 +0000
@@ -1,50 +0,0 @@
-::icu_list::provider::ListFormatterPatternsV1([
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
-])
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/mod.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/mod.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/mod.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/mod.rs 1970-01-01 00:00:00.000000000 +0000
@@ -1,22 +0,0 @@
-// @generated
-type DataStruct = <::icu_list::provider::AndListV1Marker as ::icu_provider::DataMarker>::Yokeable;
-pub fn lookup(locale: &icu_provider::DataLocale) -> Option<&'static DataStruct> {
- static KEYS: [&str; 12usize] =
- ["en", "es", "fr", "it", "ja", "pt", "ru", "tr", "und", "zh", "zh-Hans", "zh-Hant"];
- static DATA: [&DataStruct; 12usize] =
- [&EN, &ES, &FR, &IT, &JA, &PT, &RU, &TR, &UND, &ZH, &ZH, &ZH_HANT];
- KEYS.binary_search_by(|k| locale.strict_cmp(k.as_bytes()).reverse())
- .ok()
- .map(|i| unsafe { *DATA.get_unchecked(i) })
-}
-static EN: DataStruct = include!("en.rs.data");
-static ES: DataStruct = include!("es.rs.data");
-static FR: DataStruct = include!("fr.rs.data");
-static IT: DataStruct = include!("it.rs.data");
-static JA: DataStruct = include!("ja.rs.data");
-static PT: DataStruct = include!("pt.rs.data");
-static RU: DataStruct = include!("ru.rs.data");
-static TR: DataStruct = include!("tr.rs.data");
-static UND: DataStruct = include!("und.rs.data");
-static ZH_HANT: DataStruct = include!("zh-Hant.rs.data");
-static ZH: DataStruct = include!("zh.rs.data");
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/pt.rs.data rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/pt.rs.data
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/pt.rs.data 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/pt.rs.data 1970-01-01 00:00:00.000000000 +0000
@@ -1,50 +0,0 @@
-::icu_list::provider::ListFormatterPatternsV1([
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
-])
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/ru.rs.data rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/ru.rs.data
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/ru.rs.data 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/ru.rs.data 1970-01-01 00:00:00.000000000 +0000
@@ -1,50 +0,0 @@
-::icu_list::provider::ListFormatterPatternsV1([
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" и ", 4u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" и ", 4u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" и ", 4u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" и ", 4u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
-])
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/tr.rs.data rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/tr.rs.data
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/tr.rs.data 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/tr.rs.data 1970-01-01 00:00:00.000000000 +0000
@@ -1,50 +0,0 @@
-::icu_list::provider::ListFormatterPatternsV1([
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" ve ", 4u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" ve ", 4u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" ve ", 4u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(" ve ", 4u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
-])
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/und.rs.data rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/und.rs.data
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/und.rs.data 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/und.rs.data 1970-01-01 00:00:00.000000000 +0000
@@ -1,50 +0,0 @@
-::icu_list::provider::ListFormatterPatternsV1([
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8),
- special_case: None,
- },
-])
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/zh-Hant.rs.data rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/zh-Hant.rs.data
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/zh-Hant.rs.data 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/zh-Hant.rs.data 1970-01-01 00:00:00.000000000 +0000
@@ -1,50 +0,0 @@
-::icu_list::provider::ListFormatterPatternsV1([
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("和", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("和", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("和", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("和", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("和", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("和", 3u8),
- special_case: None,
- },
-])
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/zh.rs.data rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/zh.rs.data
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/zh.rs.data 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/and_v1/zh.rs.data 1970-01-01 00:00:00.000000000 +0000
@@ -1,50 +0,0 @@
-::icu_list::provider::ListFormatterPatternsV1([
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("和", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("和", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("和", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("和", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
- ::icu_list::provider::ConditionalListJoinerPattern {
- default: ::icu_list::provider::ListJoinerPattern::from_parts("、", 3u8),
- special_case: None,
- },
-])
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/mod.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/mod.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/mod.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/list/mod.rs 1970-01-01 00:00:00.000000000 +0000
@@ -1,2 +0,0 @@
-// @generated
-pub mod and_v1;
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/macros/fallback_likelysubtags_v1.data.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/macros/fallback_likelysubtags_v1.data.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/macros/fallback_likelysubtags_v1.data.rs 1970-01-01 00:00:00.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/macros/fallback_likelysubtags_v1.data.rs 2023-12-21 16:55:28.000000000 +0000
@@ -0,0 +1,40 @@
+// @generated
+/// Implement `DataProvider` on the given struct using the data
+/// hardcoded in this file. This allows the struct to be used with
+/// `icu`'s `_unstable` constructors.
+#[doc(hidden)]
+#[macro_export]
+macro_rules! __impl_fallback_likelysubtags_v1 {
+ ($ provider : ty) => {
+ #[clippy::msrv = "1.66"]
+ const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO;
+ #[clippy::msrv = "1.66"]
+ impl $provider {
+ #[doc(hidden)]
+ pub const SINGLETON_FALLBACK_LIKELYSUBTAGS_V1: &'static ::Yokeable = &icu_locid_transform::provider::LocaleFallbackLikelySubtagsV1 {
+ l2s: unsafe {
+ #[allow(unused_unsafe)]
+ zerovec::ZeroMap::from_parts_unchecked(unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"am\0ar\0as\0be\0bg\0bgcbhobn\0brxchrcv\0doiel\0fa\0gu\0he\0hi\0hy\0ja\0ka\0kk\0km\0kn\0ko\0kokks\0ky\0lo\0maimk\0ml\0mn\0mnimr\0my\0ne\0or\0pa\0ps\0rajru\0sa\0satsd\0si\0sr\0ta\0te\0tg\0th\0ti\0tt\0uk\0ur\0yuezh\0") }, unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"EthiArabBengCyrlCyrlDevaDevaBengDevaCherCyrlDevaGrekArabGujrHebrDevaArmnJpanGeorCyrlKhmrKndaKoreDevaArabCyrlLaooDevaCyrlMlymCyrlBengDevaMymrDevaOryaGuruArabDevaCyrlDevaOlckArabSinhCyrlTamlTeluCyrlThaiEthiCyrlCyrlArabHantHans") })
+ },
+ lr2s: unsafe {
+ #[allow(unused_unsafe)]
+ zerovec::ZeroMap2d::from_parts_unchecked(unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"az\0ha\0kk\0ky\0mn\0ms\0pa\0sd\0sr\0tg\0uz\0yuezh\0") }, unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"\x03\0\0\0\x05\0\0\0\t\0\0\0\x0B\0\0\0\x0C\0\0\0\r\0\0\0\x0E\0\0\0\x0F\0\0\0\x13\0\0\0\x14\0\0\0\x16\0\0\0\x17\0\0\0&\0\0\0") }, unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"IQ\0IR\0RU\0CM\0SD\0AF\0CN\0IR\0MN\0CN\0TR\0CN\0CC\0PK\0IN\0ME\0RO\0RU\0TR\0PK\0AF\0CN\0CN\0AU\0BN\0GB\0GF\0HK\0ID\0MO\0PA\0PF\0PH\0SR\0TH\0TW\0US\0VN\0") }, unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"ArabArabCyrlArabArabArabArabArabArabArabLatnMongArabArabDevaLatnLatnLatnLatnArabArabCyrlHansHantHantHantHantHantHantHantHantHantHantHantHantHantHantHant") })
+ },
+ l2r: unsafe {
+ #[allow(unused_unsafe)]
+ zerovec::ZeroMap::from_parts_unchecked(unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"af\0am\0ar\0as\0astaz\0be\0bg\0bgcbhobn\0br\0brxbs\0ca\0cebchrcs\0cv\0cy\0da\0de\0doidsbel\0en\0es\0et\0eu\0fa\0ff\0fi\0filfo\0fr\0ga\0gd\0gl\0gu\0ha\0he\0hi\0hr\0hsbhu\0hy\0ia\0id\0ig\0is\0it\0ja\0jv\0ka\0keakgpkk\0km\0kn\0ko\0kokks\0ky\0lo\0lt\0lv\0maimi\0mk\0ml\0mn\0mnimr\0ms\0my\0ne\0nl\0nn\0no\0or\0pa\0pcmpl\0ps\0pt\0qu\0rajrm\0ro\0ru\0sa\0satsc\0sd\0si\0sk\0sl\0so\0sq\0sr\0su\0sv\0sw\0ta\0te\0tg\0th\0ti\0tk\0to\0tr\0tt\0uk\0ur\0uz\0vi\0wo\0xh\0yo\0yrlyuezh\0zu\0") }, unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"ZA\0ET\0EG\0IN\0ES\0AZ\0BY\0BG\0IN\0IN\0BD\0FR\0IN\0BA\0ES\0PH\0US\0CZ\0RU\0GB\0DK\0DE\0IN\0DE\0GR\0US\0ES\0EE\0ES\0IR\0SN\0FI\0PH\0FO\0FR\0IE\0GB\0ES\0IN\0NG\0IL\0IN\0HR\0DE\0HU\0AM\x00001ID\0NG\0IS\0IT\0JP\0ID\0GE\0CV\0BR\0KZ\0KH\0IN\0KR\0IN\0IN\0KG\0LA\0LT\0LV\0IN\0NZ\0MK\0IN\0MN\0IN\0IN\0MY\0MM\0NP\0NL\0NO\0NO\0IN\0IN\0NG\0PL\0AF\0BR\0PE\0IN\0CH\0RO\0RU\0IN\0IN\0IT\0PK\0LK\0SK\0SI\0SO\0AL\0RS\0ID\0SE\0TZ\0IN\0IN\0TJ\0TH\0ET\0TM\0TO\0TR\0RU\0UA\0PK\0UZ\0VN\0SN\0ZA\0NG\0BR\0HK\0CN\0ZA\0") })
+ },
+ ls2r: unsafe {
+ #[allow(unused_unsafe)]
+ zerovec::ZeroMap2d::from_parts_unchecked(unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"az\0en\0ff\0kk\0ky\0mn\0pa\0sd\0tg\0uz\0yuezh\0") }, unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"\x01\0\0\0\x02\0\0\0\x03\0\0\0\x04\0\0\0\x06\0\0\0\x07\0\0\0\x08\0\0\0\x0B\0\0\0\x0C\0\0\0\r\0\0\0\x0E\0\0\0\x11\0\0\0") }, unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"ArabShawAdlmArabArabLatnMongArabDevaKhojSindArabArabHansBopoHanbHant") }, unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"IR\0GB\0GN\0CN\0CN\0TR\0CN\0PK\0IN\0IN\0IN\0PK\0AF\0CN\0TW\0TW\0TW\0") })
+ },
+ };
+ }
+ #[clippy::msrv = "1.66"]
+ impl icu_provider::DataProvider for $provider {
+ fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> {
+ if req.locale.is_empty() { Ok(icu_provider::DataResponse { payload: Some(icu_provider::DataPayload::from_static_ref(Self::SINGLETON_FALLBACK_LIKELYSUBTAGS_V1)), metadata: Default::default() }) } else { Err(icu_provider::DataErrorKind::ExtraneousLocale.with_req(::KEY, req)) }
+ }
+ }
+ };
+}
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/macros/fallback_parents_v1.data.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/macros/fallback_parents_v1.data.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/macros/fallback_parents_v1.data.rs 1970-01-01 00:00:00.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/macros/fallback_parents_v1.data.rs 2023-12-21 16:55:28.000000000 +0000
@@ -0,0 +1,28 @@
+// @generated
+/// Implement `DataProvider` on the given struct using the data
+/// hardcoded in this file. This allows the struct to be used with
+/// `icu`'s `_unstable` constructors.
+#[doc(hidden)]
+#[macro_export]
+macro_rules! __impl_fallback_parents_v1 {
+ ($ provider : ty) => {
+ #[clippy::msrv = "1.66"]
+ const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO;
+ #[clippy::msrv = "1.66"]
+ impl $provider {
+ #[doc(hidden)]
+ pub const SINGLETON_FALLBACK_PARENTS_V1: &'static ::Yokeable = &icu_locid_transform::provider::LocaleFallbackParentsV1 {
+ parents: unsafe {
+ #[allow(unused_unsafe)]
+ zerovec::ZeroMap::from_parts_unchecked(unsafe { zerovec::VarZeroVec::from_bytes_unchecked(b"\x84\0\0\0\0\0\x06\0\x0B\0\x10\0\x15\0\x1A\0\x1F\0$\0)\0.\x003\08\0=\0B\0G\0L\0Q\0V\0[\0`\0e\0j\0o\0t\0y\0~\0\x83\0\x88\0\x8D\0\x92\0\x97\0\x9C\0\xA1\0\xA6\0\xAB\0\xB0\0\xB5\0\xBA\0\xBF\0\xC4\0\xC9\0\xCE\0\xD3\0\xD8\0\xDD\0\xE2\0\xE7\0\xEC\0\xF1\0\xF6\0\xFB\0\0\x01\x05\x01\n\x01\x0F\x01\x14\x01\x19\x01\x1E\x01#\x01(\x01-\x012\x017\x01<\x01A\x01F\x01K\x01P\x01U\x01Z\x01_\x01d\x01i\x01n\x01s\x01x\x01}\x01\x82\x01\x87\x01\x8C\x01\x91\x01\x96\x01\x9B\x01\xA0\x01\xA5\x01\xAA\x01\xAF\x01\xB4\x01\xB9\x01\xBE\x01\xC3\x01\xC8\x01\xCD\x01\xD2\x01\xD7\x01\xDC\x01\xE1\x01\xE6\x01\xEB\x01\xF0\x01\xF5\x01\xFA\x01\xFF\x01\x04\x02\t\x02\x0E\x02\x13\x02\x18\x02\x1D\x02\"\x02'\x02,\x021\x026\x02;\x02@\x02G\x02I\x02K\x02M\x02R\x02W\x02\\\x02a\x02f\x02k\x02p\x02u\x02z\x02\x7F\x02\x84\x02\x89\x02en-150en-AGen-AIen-ATen-AUen-BBen-BEen-BMen-BSen-BWen-BZen-CCen-CHen-CKen-CMen-CXen-CYen-DEen-DGen-DKen-DMen-ERen-FIen-FJen-FKen-FMen-GBen-GDen-GGen-GHen-GIen-GMen-GYen-HKen-IEen-ILen-IMen-INen-IOen-JEen-JMen-KEen-KIen-KNen-KYen-LCen-LRen-LSen-MGen-MOen-MSen-MTen-MUen-MVen-MWen-MYen-NAen-NFen-NGen-NLen-NRen-NUen-NZen-PGen-PKen-PNen-PWen-RWen-SBen-SCen-SDen-SEen-SGen-SHen-SIen-SLen-SSen-SXen-SZen-TCen-TKen-TOen-TTen-TVen-TZen-UGen-VCen-VGen-VUen-WSen-ZAen-ZMen-ZWes-ARes-BOes-BRes-BZes-CLes-COes-CRes-CUes-DOes-ECes-GTes-HNes-MXes-NIes-PAes-PEes-PRes-PYes-SVes-USes-UYes-VEhi-Latnhtnbnnno-NOpt-AOpt-CHpt-CVpt-FRpt-GQpt-GWpt-LUpt-MOpt-MZpt-STpt-TLzh-Hant-MO") }, unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01150en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01150en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01150en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01150en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01150en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01150en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01150en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01150en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01150en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001en\0\0\0\0\0\0\x01001es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419es\0\0\0\0\0\0\x01419en\0\0\0\0\0\0\x01IN\0fr\0\0\0\0\0\0\x01HT\0no\0\0\0\0\0\0\0\0\0\0no\0\0\0\0\0\0\0\0\0\0no\0\0\0\0\0\0\0\0\0\0pt\0\0\0\0\0\0\x01PT\0pt\0\0\0\0\0\0\x01PT\0pt\0\0\0\0\0\0\x01PT\0pt\0\0\0\0\0\0\x01PT\0pt\0\0\0\0\0\0\x01PT\0pt\0\0\0\0\0\0\x01PT\0pt\0\0\0\0\0\0\x01PT\0pt\0\0\0\0\0\0\x01PT\0pt\0\0\0\0\0\0\x01PT\0pt\0\0\0\0\0\0\x01PT\0pt\0\0\0\0\0\0\x01PT\0zh\0\x01Hant\x01HK\0") })
+ },
+ };
+ }
+ #[clippy::msrv = "1.66"]
+ impl icu_provider::DataProvider for $provider {
+ fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> {
+ if req.locale.is_empty() { Ok(icu_provider::DataResponse { payload: Some(icu_provider::DataPayload::from_static_ref(Self::SINGLETON_FALLBACK_PARENTS_V1)), metadata: Default::default() }) } else { Err(icu_provider::DataErrorKind::ExtraneousLocale.with_req(::KEY, req)) }
+ }
+ }
+ };
+}
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/macros/fallback_supplement_co_v1.data.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/macros/fallback_supplement_co_v1.data.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/macros/fallback_supplement_co_v1.data.rs 1970-01-01 00:00:00.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/macros/fallback_supplement_co_v1.data.rs 2023-12-21 16:55:28.000000000 +0000
@@ -0,0 +1,32 @@
+// @generated
+/// Implement `DataProvider` on the given struct using the data
+/// hardcoded in this file. This allows the struct to be used with
+/// `icu`'s `_unstable` constructors.
+#[doc(hidden)]
+#[macro_export]
+macro_rules! __impl_fallback_supplement_co_v1 {
+ ($ provider : ty) => {
+ #[clippy::msrv = "1.66"]
+ const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO;
+ #[clippy::msrv = "1.66"]
+ impl $provider {
+ #[doc(hidden)]
+ pub const SINGLETON_FALLBACK_SUPPLEMENT_CO_V1: &'static ::Yokeable = &icu_locid_transform::provider::LocaleFallbackSupplementV1 {
+ parents: unsafe {
+ #[allow(unused_unsafe)]
+ zerovec::ZeroMap::from_parts_unchecked(unsafe { zerovec::VarZeroVec::from_bytes_unchecked(b"\x01\0\0\0\0\0yue") }, unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"zh\0\x01Hant\0\0\0\0") })
+ },
+ unicode_extension_defaults: unsafe {
+ #[allow(unused_unsafe)]
+ zerovec::ZeroMap2d::from_parts_unchecked(unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"co") }, unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"\x02\0\0\0") }, unsafe { zerovec::VarZeroVec::from_bytes_unchecked(b"\x02\0\0\0\0\0\x02\0zhzh-Hant") }, unsafe { zerovec::VarZeroVec::from_bytes_unchecked(b"\x02\0\0\0\0\0\x06\0pinyinstroke") })
+ },
+ };
+ }
+ #[clippy::msrv = "1.66"]
+ impl icu_provider::DataProvider for $provider {
+ fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> {
+ if req.locale.is_empty() { Ok(icu_provider::DataResponse { payload: Some(icu_provider::DataPayload::from_static_ref(Self::SINGLETON_FALLBACK_SUPPLEMENT_CO_V1)), metadata: Default::default() }) } else { Err(icu_provider::DataErrorKind::ExtraneousLocale.with_req(::KEY, req)) }
+ }
+ }
+ };
+}
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/macros/list_and_v1.data.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/macros/list_and_v1.data.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/macros/list_and_v1.data.rs 1970-01-01 00:00:00.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/macros/list_and_v1.data.rs 2023-12-21 16:55:28.000000000 +0000
@@ -0,0 +1,35 @@
+// @generated
+/// Implement `DataProvider` on the given struct using the data
+/// hardcoded in this file. This allows the struct to be used with
+/// `icu`'s `_unstable` constructors.
+#[doc(hidden)]
+#[macro_export]
+macro_rules! __impl_list_and_v1 {
+ ($ provider : ty) => {
+ #[clippy::msrv = "1.66"]
+ const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO;
+ #[clippy::msrv = "1.66"]
+ impl icu_provider::DataProvider for $provider {
+ fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> {
+ static EN_001: ::Yokeable = icu_list::provider::ListFormatterPatternsV1([icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" and ", 5u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" and ", 5u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" and ", 5u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" and ", 5u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }]);
+ static EN_IN: ::Yokeable = icu_list::provider::ListFormatterPatternsV1([icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" and ", 5u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" and ", 5u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" and ", 5u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" and ", 5u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", and ", 6u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }]);
+ static IT: ::Yokeable = icu_list::provider::ListFormatterPatternsV1([icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8), special_case: None }]);
+ static PT: ::Yokeable = icu_list::provider::ListFormatterPatternsV1([icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }]);
+ static FR: ::Yokeable = icu_list::provider::ListFormatterPatternsV1([icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" et ", 4u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" et ", 4u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" et ", 4u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" et ", 4u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }]);
+ static TR: ::Yokeable = icu_list::provider::ListFormatterPatternsV1([icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" ve ", 4u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" ve ", 4u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" ve ", 4u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" ve ", 4u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }]);
+ static ES: ::Yokeable = icu_list::provider::ListFormatterPatternsV1([icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" y ", 3u8), special_case: Some(icu_list::provider::SpecialCasePattern { condition: unsafe { icu_list::provider::SerdeDFA::from_dfa_bytes_unchecked(if cfg!(target_endian = "little") { b"rust-regex-automata-dfa-sparse\0\0\xFF\xFE\0\0\x02\0\0\0\0\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B(\x01\0\0\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xDD\0\0\0\0\0\0\0\0\x04\0\0\0\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#\0\0\0" } else { b"rust-regex-automata-dfa-sparse\0\0\0\0\xFE\xFF\0\0\0\x02\0\0\0\0\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\0\0\x01(\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xDD\0\0\0\0\0\0\0\0\0\0\0\x04\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\0\0\0#\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#" }) }, pattern: icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8) }) }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" y ", 3u8), special_case: Some(icu_list::provider::SpecialCasePattern { condition: unsafe { icu_list::provider::SerdeDFA::from_dfa_bytes_unchecked(if cfg!(target_endian = "little") { b"rust-regex-automata-dfa-sparse\0\0\xFF\xFE\0\0\x02\0\0\0\0\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B(\x01\0\0\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xDD\0\0\0\0\0\0\0\0\x04\0\0\0\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#\0\0\0" } else { b"rust-regex-automata-dfa-sparse\0\0\0\0\xFE\xFF\0\0\0\x02\0\0\0\0\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\0\0\x01(\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xDD\0\0\0\0\0\0\0\0\0\0\0\x04\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\0\0\0#\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#" }) }, pattern: icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8) }) }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" y ", 3u8), special_case: Some(icu_list::provider::SpecialCasePattern { condition: unsafe { icu_list::provider::SerdeDFA::from_dfa_bytes_unchecked(if cfg!(target_endian = "little") { b"rust-regex-automata-dfa-sparse\0\0\xFF\xFE\0\0\x02\0\0\0\0\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B(\x01\0\0\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xDD\0\0\0\0\0\0\0\0\x04\0\0\0\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#\0\0\0" } else { b"rust-regex-automata-dfa-sparse\0\0\0\0\xFE\xFF\0\0\0\x02\0\0\0\0\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\0\0\x01(\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xDD\0\0\0\0\0\0\0\0\0\0\0\x04\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\0\0\0#\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#" }) }, pattern: icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8) }) }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" y ", 3u8), special_case: Some(icu_list::provider::SpecialCasePattern { condition: unsafe { icu_list::provider::SerdeDFA::from_dfa_bytes_unchecked(if cfg!(target_endian = "little") { b"rust-regex-automata-dfa-sparse\0\0\xFF\xFE\0\0\x02\0\0\0\0\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B(\x01\0\0\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xDD\0\0\0\0\0\0\0\0\x04\0\0\0\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#\0\0\0" } else { b"rust-regex-automata-dfa-sparse\0\0\0\0\xFE\xFF\0\0\0\x02\0\0\0\0\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\0\0\x01(\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xDD\0\0\0\0\0\0\0\0\0\0\0\x04\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\0\0\0#\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#" }) }, pattern: icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8) }) }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" y ", 3u8), special_case: Some(icu_list::provider::SpecialCasePattern { condition: unsafe { icu_list::provider::SerdeDFA::from_dfa_bytes_unchecked(if cfg!(target_endian = "little") { b"rust-regex-automata-dfa-sparse\0\0\xFF\xFE\0\0\x02\0\0\0\0\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B(\x01\0\0\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xDD\0\0\0\0\0\0\0\0\x04\0\0\0\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#\0\0\0" } else { b"rust-regex-automata-dfa-sparse\0\0\0\0\xFE\xFF\0\0\0\x02\0\0\0\0\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\0\0\x01(\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xDD\0\0\0\0\0\0\0\0\0\0\0\x04\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\0\0\0#\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#" }) }, pattern: icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8) }) }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" y ", 3u8), special_case: Some(icu_list::provider::SpecialCasePattern { condition: unsafe { icu_list::provider::SerdeDFA::from_dfa_bytes_unchecked(if cfg!(target_endian = "little") { b"rust-regex-automata-dfa-sparse\0\0\xFF\xFE\0\0\x02\0\0\0\0\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B(\x01\0\0\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xDD\0\0\0\0\0\0\0\0\x04\0\0\0\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#\0\0\0" } else { b"rust-regex-automata-dfa-sparse\0\0\0\0\xFE\xFF\0\0\0\x02\0\0\0\0\0\0\0\x0E\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\x02\x02\x02\x03\x04\x04\x05\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x08\t\t\t\n\x0B\x0B\x0C\r\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0E\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x0F\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12\x12\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x13\x14\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x16\x17\x17\x18\x19\x19\x19\x1A\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\x1B\0\0\x01(\x01\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x01\x80\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\x05\0\x05\x05\x06\x06\x0C\x0C\r\r\0\0S\0\0\0D\0\0\0S\0\0\0D\0\0\0\0\0\0\0\0\x02\0\0\x1B\0\0\x12\0\0\0\x12\0\0\0\0\x03\0\x06\x06\r\r\0\0h\0\0\0h\0\0\0\0\0\0\0\0\x0E\0\0\0\x02\x02\x04\x07\t\t\x0B\x0E\x13\x13\x14\x14\x15\x15\x16\x16\x17\x17\x18\x18\x19\x19\x1A\x1A\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0D\0\0\0\xBF\0\0\0\xCE\0\0\0\xDD\0\0\0\xEC\0\0\0\xDD\0\0\0\xFB\0\0\0\n\x01\0\0\x19\x01\0\0\x12\0\0\0\0\x02\0\x0F\x11\0\0D\0\0\0\0\0\0\0\0\x02\0\x11\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x0F\x10\0\0\xBF\0\0\0\0\0\0\0\0\x02\0\x10\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x11\0\0\xDD\0\0\0\0\0\0\0\0\x02\0\x0F\x0F\0\0\xDD\0\0\0\0\0\0\0\0\0\0\0\x04\0\0\0\0#\0\0\0#\0\0\0#\0\0\0#\0\0\0\0\0\0#\0\0\0\t\0\0\0\x12\0\0\0\x12\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#" }) }, pattern: icu_list::provider::ListJoinerPattern::from_parts(" e ", 3u8) }) }]);
+ static RU: ::Yokeable = icu_list::provider::ListFormatterPatternsV1([icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" и ", 4u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" и ", 4u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" и ", 4u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" и ", 4u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }]);
+ static UND: ::Yokeable = icu_list::provider::ListFormatterPatternsV1([icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }]);
+ static EN: ::Yokeable = icu_list::provider::ListFormatterPatternsV1([icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", and ", 6u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" and ", 5u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", & ", 4u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" & ", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }]);
+ static HI_LATN: ::Yokeable = icu_list::provider::ListFormatterPatternsV1([icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", aur ", 6u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" aur ", 5u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", aur ", 6u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" aur ", 5u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(", ", 2u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts(" aur ", 5u8), special_case: None }]);
+ static JA: ::Yokeable = icu_list::provider::ListFormatterPatternsV1([icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }]);
+ static ZH_HK: ::Yokeable = icu_list::provider::ListFormatterPatternsV1([icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("及", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("及", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("及", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("及", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("及", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("及", 3u8), special_case: None }]);
+ static ZH: ::Yokeable = icu_list::provider::ListFormatterPatternsV1([icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("和", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("和", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("和", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("和", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }]);
+ static ZH_HANT: ::Yokeable = icu_list::provider::ListFormatterPatternsV1([icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("和", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("和", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("和", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("和", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("、", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("和", 3u8), special_case: None }, icu_list::provider::ConditionalListJoinerPattern { default: icu_list::provider::ListJoinerPattern::from_parts("和", 3u8), special_case: None }]);
+ static VALUES: [&::Yokeable; 215usize] = [&EN, &EN_001, &EN_001, &EN, &EN_001, &EN_001, &EN, &EN_001, &EN_001, &EN_001, &EN_001, &EN, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_IN, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN, &EN_001, &EN, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN, &EN_001, &EN_001, &EN, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &EN, &EN_001, &EN_001, &EN, &EN_001, &EN_001, &EN_001, &EN_001, &EN_001, &ES, &ES, &ES, &ES, &ES, &ES, &ES, &ES, &ES, &ES, &ES, &ES, &ES, &ES, &ES, &ES, &ES, &ES, &ES, &ES, &ES, &ES, &ES, &ES, &ES, &ES, &ES, &ES, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &FR, &HI_LATN, &IT, &IT, &IT, &IT, &JA, &PT, &PT, &PT, &PT, &PT, &PT, &PT, &PT, &PT, &PT, &PT, &PT, &RU, &RU, &RU, &RU, &RU, &RU, &TR, &TR, &UND, &ZH, &ZH_HK, &ZH, &ZH, &ZH, &ZH_HANT, &ZH_HK, &ZH];
+ static KEYS: [&str; 215usize] = ["en", "en-001", "en-150", "en-AE", "en-AG", "en-AI", "en-AS", "en-AT", "en-AU", "en-BB", "en-BE", "en-BI", "en-BM", "en-BS", "en-BW", "en-BZ", "en-CA", "en-CC", "en-CH", "en-CK", "en-CM", "en-CX", "en-CY", "en-DE", "en-DG", "en-DK", "en-DM", "en-ER", "en-FI", "en-FJ", "en-FK", "en-FM", "en-GB", "en-GD", "en-GG", "en-GH", "en-GI", "en-GM", "en-GU", "en-GY", "en-HK", "en-IE", "en-IL", "en-IM", "en-IN", "en-IO", "en-JE", "en-JM", "en-KE", "en-KI", "en-KN", "en-KY", "en-LC", "en-LR", "en-LS", "en-MG", "en-MH", "en-MO", "en-MP", "en-MS", "en-MT", "en-MU", "en-MV", "en-MW", "en-MY", "en-NA", "en-NF", "en-NG", "en-NL", "en-NR", "en-NU", "en-NZ", "en-PG", "en-PH", "en-PK", "en-PN", "en-PR", "en-PW", "en-RW", "en-SB", "en-SC", "en-SD", "en-SE", "en-SG", "en-SH", "en-SI", "en-SL", "en-SS", "en-SX", "en-SZ", "en-TC", "en-TK", "en-TO", "en-TT", "en-TV", "en-TZ", "en-UG", "en-UM", "en-VC", "en-VG", "en-VI", "en-VU", "en-WS", "en-ZA", "en-ZM", "en-ZW", "es", "es-419", "es-AR", "es-BO", "es-BR", "es-BZ", "es-CL", "es-CO", "es-CR", "es-CU", "es-DO", "es-EA", "es-EC", "es-GQ", "es-GT", "es-HN", "es-IC", "es-MX", "es-NI", "es-PA", "es-PE", "es-PH", "es-PR", "es-PY", "es-SV", "es-US", "es-UY", "es-VE", "fr", "fr-BE", "fr-BF", "fr-BI", "fr-BJ", "fr-BL", "fr-CA", "fr-CD", "fr-CF", "fr-CG", "fr-CH", "fr-CI", "fr-CM", "fr-DJ", "fr-DZ", "fr-GA", "fr-GF", "fr-GN", "fr-GP", "fr-GQ", "fr-HT", "fr-KM", "fr-LU", "fr-MA", "fr-MC", "fr-MF", "fr-MG", "fr-ML", "fr-MQ", "fr-MR", "fr-MU", "fr-NC", "fr-NE", "fr-PF", "fr-PM", "fr-RE", "fr-RW", "fr-SC", "fr-SN", "fr-SY", "fr-TD", "fr-TG", "fr-TN", "fr-VU", "fr-WF", "fr-YT", "hi-Latn", "it", "it-CH", "it-SM", "it-VA", "ja", "pt", "pt-AO", "pt-CH", "pt-CV", "pt-GQ", "pt-GW", "pt-LU", "pt-MO", "pt-MZ", "pt-PT", "pt-ST", "pt-TL", "ru", "ru-BY", "ru-KG", "ru-KZ", "ru-MD", "ru-UA", "tr", "tr-CY", "und", "zh", "zh-HK", "zh-Hans", "zh-Hans-HK", "zh-Hans-MO", "zh-Hant", "zh-MO", "zh-SG"];
+ if let Ok(payload) = KEYS.binary_search_by(|k| req.locale.strict_cmp(k.as_bytes()).reverse()).map(|i| *unsafe { VALUES.get_unchecked(i) }) { Ok(icu_provider::DataResponse { payload: Some(icu_provider::DataPayload::from_static_ref(payload)), metadata: Default::default() }) } else { Err(icu_provider::DataErrorKind::MissingLocale.with_req(::KEY, req)) }
+ }
+ }
+ };
+}
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/macros.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/macros.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/macros.rs 1970-01-01 00:00:00.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/macros.rs 2023-12-21 16:55:28.000000000 +0000
@@ -0,0 +1,46 @@
+// @generated
+/// Marks a type as a data provider. You can then use macros like
+/// `impl_core_helloworld_v1` to add implementations.
+///
+/// ```ignore
+/// struct MyProvider;
+/// const _: () = {
+/// include!("path/to/generated/macros.rs");
+/// make_provider!(MyProvider);
+/// impl_core_helloworld_v1!(MyProvider);
+/// }
+/// ```
+#[doc(hidden)]
+#[macro_export]
+macro_rules! __make_provider {
+ ($ name : ty) => {
+ #[clippy::msrv = "1.66"]
+ impl $name {
+ #[doc(hidden)]
+ #[allow(dead_code)]
+ pub const MUST_USE_MAKE_PROVIDER_MACRO: () = ();
+ }
+ };
+}
+#[doc(inline)]
+pub use __make_provider as make_provider;
+#[macro_use]
+#[path = "macros/fallback_likelysubtags_v1.data.rs"]
+mod fallback_likelysubtags_v1;
+#[doc(inline)]
+pub use __impl_fallback_likelysubtags_v1 as impl_fallback_likelysubtags_v1;
+#[macro_use]
+#[path = "macros/fallback_parents_v1.data.rs"]
+mod fallback_parents_v1;
+#[doc(inline)]
+pub use __impl_fallback_parents_v1 as impl_fallback_parents_v1;
+#[macro_use]
+#[path = "macros/fallback_supplement_co_v1.data.rs"]
+mod fallback_supplement_co_v1;
+#[doc(inline)]
+pub use __impl_fallback_supplement_co_v1 as impl_fallback_supplement_co_v1;
+#[macro_use]
+#[path = "macros/list_and_v1.data.rs"]
+mod list_and_v1;
+#[doc(inline)]
+pub use __impl_list_and_v1 as impl_list_and_v1;
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/mod.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/mod.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/mod.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/data/mod.rs 2023-12-21 16:55:28.000000000 +0000
@@ -1,122 +1,31 @@
// @generated
-#[clippy::msrv = "1.61"]
-mod fallback;
-#[clippy::msrv = "1.61"]
-mod list;
-#[clippy::msrv = "1.61"]
-use icu_provider::prelude::*;
-/// Implement [`DataProvider`] on the given struct using the data
-/// hardcoded in this module. This allows the struct to be used with
-/// `icu`'s `_unstable` constructors.
-///
-/// This macro can only be called from its definition-site, i.e. right
-/// after `include!`-ing the generated module.
-///
-/// ```compile_fail
-/// struct MyDataProvider;
-/// include!("/path/to/generated/mod.rs");
-/// impl_data_provider(MyDataProvider);
-/// ```
-#[allow(unused_macros)]
+include!("macros.rs");
macro_rules! impl_data_provider {
- ($ provider : path) => {
- #[clippy::msrv = "1.61"]
- impl DataProvider<::icu_list::provider::AndListV1Marker> for $provider {
- fn load(&self, req: DataRequest) -> Result, DataError> {
- list::and_v1::lookup(&req.locale)
- .map(zerofrom::ZeroFrom::zero_from)
- .map(DataPayload::from_owned)
- .map(|payload| DataResponse { metadata: Default::default(), payload: Some(payload) })
- .ok_or_else(|| DataErrorKind::MissingLocale.with_req(::icu_list::provider::AndListV1Marker::KEY, req))
- }
- }
- #[clippy::msrv = "1.61"]
- impl DataProvider<::icu_provider_adapters::fallback::provider::CollationFallbackSupplementV1Marker> for $provider {
- fn load(
- &self,
- req: DataRequest,
- ) -> Result, DataError> {
- fallback::supplement::co_v1::lookup(&req.locale)
- .map(zerofrom::ZeroFrom::zero_from)
- .map(DataPayload::from_owned)
- .map(|payload| DataResponse { metadata: Default::default(), payload: Some(payload) })
- .ok_or_else(|| {
- DataErrorKind::MissingLocale
- .with_req(::icu_provider_adapters::fallback::provider::CollationFallbackSupplementV1Marker::KEY, req)
- })
- }
- }
- #[clippy::msrv = "1.61"]
- impl DataProvider<::icu_provider_adapters::fallback::provider::LocaleFallbackLikelySubtagsV1Marker> for $provider {
- fn load(
- &self,
- req: DataRequest,
- ) -> Result, DataError> {
- fallback::likelysubtags_v1::lookup(&req.locale)
- .map(zerofrom::ZeroFrom::zero_from)
- .map(DataPayload::from_owned)
- .map(|payload| DataResponse { metadata: Default::default(), payload: Some(payload) })
- .ok_or_else(|| {
- DataErrorKind::MissingLocale
- .with_req(::icu_provider_adapters::fallback::provider::LocaleFallbackLikelySubtagsV1Marker::KEY, req)
- })
- }
- }
- #[clippy::msrv = "1.61"]
- impl DataProvider<::icu_provider_adapters::fallback::provider::LocaleFallbackParentsV1Marker> for $provider {
- fn load(
- &self,
- req: DataRequest,
- ) -> Result, DataError> {
- fallback::parents_v1::lookup(&req.locale)
- .map(zerofrom::ZeroFrom::zero_from)
- .map(DataPayload::from_owned)
- .map(|payload| DataResponse { metadata: Default::default(), payload: Some(payload) })
- .ok_or_else(|| {
- DataErrorKind::MissingLocale.with_req(::icu_provider_adapters::fallback::provider::LocaleFallbackParentsV1Marker::KEY, req)
- })
- }
- }
+ ($ provider : ty) => {
+ make_provider!($provider);
+ impl_fallback_likelysubtags_v1!($provider);
+ impl_fallback_parents_v1!($provider);
+ impl_fallback_supplement_co_v1!($provider);
+ impl_list_and_v1!($provider);
};
}
-/// Implement [`AnyProvider`] on the given struct using the data
-/// hardcoded in this module. This allows the struct to be used with
-/// `icu`'s `_any` constructors.
-///
-/// This macro can only be called from its definition-site, i.e. right
-/// after `include!`-ing the generated module.
-///
-/// ```compile_fail
-/// struct MyAnyProvider;
-/// include!("/path/to/generated/mod.rs");
-/// impl_any_provider(MyAnyProvider);
-/// ```
#[allow(unused_macros)]
macro_rules! impl_any_provider {
- ($ provider : path) => {
- #[clippy::msrv = "1.61"]
- impl AnyProvider for $provider {
- fn load_any(&self, key: DataKey, req: DataRequest) -> Result {
- const ANDLISTV1MARKER: ::icu_provider::DataKeyHash = ::icu_list::provider::AndListV1Marker::KEY.hashed();
- const COLLATIONFALLBACKSUPPLEMENTV1MARKER: ::icu_provider::DataKeyHash =
- ::icu_provider_adapters::fallback::provider::CollationFallbackSupplementV1Marker::KEY.hashed();
- const LOCALEFALLBACKLIKELYSUBTAGSV1MARKER: ::icu_provider::DataKeyHash =
- ::icu_provider_adapters::fallback::provider::LocaleFallbackLikelySubtagsV1Marker::KEY.hashed();
- const LOCALEFALLBACKPARENTSV1MARKER: ::icu_provider::DataKeyHash =
- ::icu_provider_adapters::fallback::provider::LocaleFallbackParentsV1Marker::KEY.hashed();
+ ($ provider : ty) => {
+ #[clippy::msrv = "1.66"]
+ impl icu_provider::AnyProvider for $provider {
+ fn load_any(&self, key: icu_provider::DataKey, req: icu_provider::DataRequest) -> Result {
match key.hashed() {
- ANDLISTV1MARKER => list::and_v1::lookup(&req.locale).map(AnyPayload::from_static_ref),
- COLLATIONFALLBACKSUPPLEMENTV1MARKER => fallback::supplement::co_v1::lookup(&req.locale).map(AnyPayload::from_static_ref),
- LOCALEFALLBACKLIKELYSUBTAGSV1MARKER => fallback::likelysubtags_v1::lookup(&req.locale).map(AnyPayload::from_static_ref),
- LOCALEFALLBACKPARENTSV1MARKER => fallback::parents_v1::lookup(&req.locale).map(AnyPayload::from_static_ref),
- _ => return Err(DataErrorKind::MissingDataKey.with_req(key, req)),
+ h if h == ::KEY.hashed() => icu_provider::DataProvider::::load(self, req).map(icu_provider::DataResponse::wrap_into_any_response),
+ h if h == ::KEY.hashed() => icu_provider::DataProvider::::load(self, req).map(icu_provider::DataResponse::wrap_into_any_response),
+ h if h == ::KEY.hashed() => icu_provider::DataProvider::::load(self, req).map(icu_provider::DataResponse::wrap_into_any_response),
+ h if h == ::KEY.hashed() => icu_provider::DataProvider::::load(self, req).map(icu_provider::DataResponse::wrap_into_any_response),
+ _ => Err(icu_provider::DataErrorKind::MissingDataKey.with_req(key, req)),
}
- .map(|payload| AnyResponse { payload: Some(payload), metadata: Default::default() })
- .ok_or_else(|| DataErrorKind::MissingLocale.with_req(key, req))
}
}
};
}
-#[clippy::msrv = "1.61"]
+#[clippy::msrv = "1.66"]
pub struct BakedDataProvider;
impl_data_provider!(BakedDataProvider);
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/lib.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/lib.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/lib.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_baked_icu_data/src/lib.rs 2023-12-21 16:55:28.000000000 +0000
@@ -19,6 +19,10 @@
//! -k list/and@1 fallback/likelysubtags@1 fallback/parents@1 fallback/supplement/co@1 \
//! --cldr-tag latest --icuexport-tag latest -o src/data
//! ```
+
+#![cfg_attr(not(bootstrap), allow(internal_features))]
+#![cfg_attr(not(bootstrap), feature(rustdoc_internals))]
+#![cfg_attr(not(bootstrap), doc(rust_logo))]
#![allow(elided_lifetimes_in_paths)]
mod data {
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/Cargo.toml rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/Cargo.toml
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/Cargo.toml 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/Cargo.toml 2023-12-21 16:55:28.000000000 +0000
@@ -3,19 +3,16 @@
version = "0.0.0"
edition = "2021"
-[lib]
-
[dependencies]
+# tidy-alphabetical-start
either = "1.5.0"
itertools = "0.10.1"
-tracing = "0.1"
polonius-engine = "0.13.0"
-smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
rustc_data_structures = { path = "../rustc_data_structures" }
rustc_errors = { path = "../rustc_errors" }
+rustc_fluent_macro = { path = "../rustc_fluent_macro" }
rustc_graphviz = { path = "../rustc_graphviz" }
rustc_hir = { path = "../rustc_hir" }
-rustc_fluent_macro = { path = "../rustc_fluent_macro" }
rustc_index = { path = "../rustc_index" }
rustc_infer = { path = "../rustc_infer" }
rustc_lexer = { path = "../rustc_lexer" }
@@ -24,7 +21,10 @@
rustc_mir_dataflow = { path = "../rustc_mir_dataflow" }
rustc_serialize = { path = "../rustc_serialize" }
rustc_session = { path = "../rustc_session" }
+rustc_span = { path = "../rustc_span" }
rustc_target = { path = "../rustc_target" }
rustc_trait_selection = { path = "../rustc_trait_selection" }
rustc_traits = { path = "../rustc_traits" }
-rustc_span = { path = "../rustc_span" }
+smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
+tracing = "0.1"
+# tidy-alphabetical-end
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/messages.ftl rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/messages.ftl
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/messages.ftl 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/messages.ftl 2023-12-21 16:55:28.000000000 +0000
@@ -1,20 +1,20 @@
borrowck_assign_due_to_use_closure =
assignment occurs due to use in closure
-borrowck_assign_due_to_use_generator =
- assign occurs due to use in generator
+borrowck_assign_due_to_use_coroutine =
+ assign occurs due to use in coroutine
borrowck_assign_part_due_to_use_closure =
assignment to part occurs due to use in closure
-borrowck_assign_part_due_to_use_generator =
- assign to part occurs due to use in generator
+borrowck_assign_part_due_to_use_coroutine =
+ assign to part occurs due to use in coroutine
borrowck_borrow_due_to_use_closure =
borrow occurs due to use in closure
-borrowck_borrow_due_to_use_generator =
- borrow occurs due to use in generator
+borrowck_borrow_due_to_use_coroutine =
+ borrow occurs due to use in coroutine
borrowck_calling_operator_moves_lhs =
calling this operator moves the left-hand side
@@ -142,11 +142,11 @@
*[false] moved
} due to use in closure
-borrowck_partial_var_move_by_use_in_generator =
+borrowck_partial_var_move_by_use_in_coroutine =
variable {$is_partial ->
[true] partially moved
*[false] moved
- } due to use in generator
+ } due to use in coroutine
borrowck_returned_async_block_escaped =
returns an `async` block that contains a reference to a captured variable, which then escapes the closure body
@@ -180,15 +180,15 @@
borrowck_use_due_to_use_closure =
use occurs due to use in closure
-borrowck_use_due_to_use_generator =
- use occurs due to use in generator
+borrowck_use_due_to_use_coroutine =
+ use occurs due to use in coroutine
borrowck_used_impl_require_static =
the used `impl` has a `'static` requirement
borrowck_value_capture_here =
value captured {$is_within ->
- [true] here by generator
+ [true] here by coroutine
*[false] here
}
@@ -207,8 +207,8 @@
borrowck_var_borrow_by_use_in_closure =
borrow occurs due to use in closure
-borrowck_var_borrow_by_use_in_generator =
- borrow occurs due to use in generator
+borrowck_var_borrow_by_use_in_coroutine =
+ borrow occurs due to use in coroutine
borrowck_var_borrow_by_use_place_in_closure =
{$is_single_var ->
@@ -216,11 +216,11 @@
[false] borrows occur
} due to use of {$place} in closure
-borrowck_var_borrow_by_use_place_in_generator =
+borrowck_var_borrow_by_use_place_in_coroutine =
{$is_single_var ->
*[true] borrow occurs
[false] borrows occur
- } due to use of {$place} in generator
+ } due to use of {$place} in coroutine
borrowck_var_cannot_escape_closure =
captured variable cannot escape `FnMut` closure body
@@ -234,8 +234,8 @@
borrowck_var_first_borrow_by_use_place_in_closure =
first borrow occurs due to use of {$place} in closure
-borrowck_var_first_borrow_by_use_place_in_generator =
- first borrow occurs due to use of {$place} in generator
+borrowck_var_first_borrow_by_use_place_in_coroutine =
+ first borrow occurs due to use of {$place} in coroutine
borrowck_var_here_captured = variable captured here
@@ -244,8 +244,8 @@
borrowck_var_move_by_use_in_closure =
move occurs due to use in closure
-borrowck_var_move_by_use_in_generator =
- move occurs due to use in generator
+borrowck_var_move_by_use_in_coroutine =
+ move occurs due to use in coroutine
borrowck_var_mutable_borrow_by_use_place_in_closure =
mutable borrow occurs due to use of {$place} in closure
@@ -253,5 +253,5 @@
borrowck_var_second_borrow_by_use_place_in_closure =
second borrow occurs due to use of {$place} in closure
-borrowck_var_second_borrow_by_use_place_in_generator =
- second borrow occurs due to use of {$place} in generator
+borrowck_var_second_borrow_by_use_place_in_coroutine =
+ second borrow occurs due to use of {$place} in coroutine
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/borrowck_errors.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/borrowck_errors.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/borrowck_errors.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/borrowck_errors.rs 2023-12-21 16:55:28.000000000 +0000
@@ -368,16 +368,17 @@
err
}
- pub(crate) fn cannot_borrow_across_generator_yield(
+ pub(crate) fn cannot_borrow_across_coroutine_yield(
&self,
span: Span,
yield_span: Span,
) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> {
+ let coroutine_kind = self.body.coroutine.as_ref().unwrap().coroutine_kind;
let mut err = struct_span_err!(
self,
span,
E0626,
- "borrow may still be in use when generator yields",
+ "borrow may still be in use when {coroutine_kind:#} yields",
);
err.span_label(yield_span, "possible yield occurs here");
err
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/dataflow.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/dataflow.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/dataflow.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/dataflow.rs 2023-12-21 16:55:28.000000000 +0000
@@ -1,6 +1,7 @@
#![deny(rustc::untranslatable_diagnostic)]
#![deny(rustc::diagnostic_outside_of_impl)]
use rustc_data_structures::fx::FxIndexMap;
+use rustc_data_structures::graph::WithSuccessors;
use rustc_index::bit_set::BitSet;
use rustc_middle::mir::{
self, BasicBlock, Body, CallReturnPlaces, Location, Place, TerminatorEdges,
@@ -222,6 +223,7 @@
}
}
+// This is `pub` because it's used by unstable external borrowck data users, see `consumers.rs`.
pub fn calculate_borrows_out_of_scope_at_location<'tcx>(
body: &Body<'tcx>,
regioncx: &RegionInferenceContext<'tcx>,
@@ -238,15 +240,203 @@
prec.borrows_out_of_scope_at_location
}
+struct PoloniusOutOfScopePrecomputer<'a, 'tcx> {
+ visited: BitSet,
+ visit_stack: Vec,
+ body: &'a Body<'tcx>,
+ regioncx: &'a RegionInferenceContext<'tcx>,
+
+ loans_out_of_scope_at_location: FxIndexMap>,
+}
+
+impl<'a, 'tcx> PoloniusOutOfScopePrecomputer<'a, 'tcx> {
+ fn new(body: &'a Body<'tcx>, regioncx: &'a RegionInferenceContext<'tcx>) -> Self {
+ Self {
+ visited: BitSet::new_empty(body.basic_blocks.len()),
+ visit_stack: vec![],
+ body,
+ regioncx,
+ loans_out_of_scope_at_location: FxIndexMap::default(),
+ }
+ }
+}
+
+impl<'tcx> PoloniusOutOfScopePrecomputer<'_, 'tcx> {
+ /// Loans are in scope while they are live: whether they are contained within any live region.
+ /// In the location-insensitive analysis, a loan will be contained in a region if the issuing
+ /// region can reach it in the subset graph. So this is a reachability problem.
+ fn precompute_loans_out_of_scope(
+ &mut self,
+ loan_idx: BorrowIndex,
+ issuing_region: RegionVid,
+ loan_issued_at: Location,
+ ) {
+ let sccs = self.regioncx.constraint_sccs();
+ let universal_regions = self.regioncx.universal_regions();
+
+ // We first handle the cases where the loan doesn't go out of scope, depending on the issuing
+ // region's successors.
+ for successor in self.regioncx.region_graph().depth_first_search(issuing_region) {
+ // 1. Via applied member constraints
+ //
+ // The issuing region can flow into the choice regions, and they are either:
+ // - placeholders or free regions themselves,
+ // - or also transitively outlive a free region.
+ //
+ // That is to say, if there are applied member constraints here, the loan escapes the
+ // function and cannot go out of scope. We could early return here.
+ //
+ // For additional insurance via fuzzing and crater, we verify that the constraint's min
+ // choice indeed escapes the function. In the future, we could e.g. turn this check into
+ // a debug assert and early return as an optimization.
+ let scc = sccs.scc(successor);
+ for constraint in self.regioncx.applied_member_constraints(scc) {
+ if universal_regions.is_universal_region(constraint.min_choice) {
+ return;
+ }
+ }
+
+ // 2. Via regions that are live at all points: placeholders and free regions.
+ //
+ // If the issuing region outlives such a region, its loan escapes the function and
+ // cannot go out of scope. We can early return.
+ if self.regioncx.is_region_live_at_all_points(successor) {
+ return;
+ }
+ }
+
+ let first_block = loan_issued_at.block;
+ let first_bb_data = &self.body.basic_blocks[first_block];
+
+ // The first block we visit is the one where the loan is issued, starting from the statement
+ // where the loan is issued: at `loan_issued_at`.
+ let first_lo = loan_issued_at.statement_index;
+ let first_hi = first_bb_data.statements.len();
+
+ if let Some(kill_location) =
+ self.loan_kill_location(loan_idx, loan_issued_at, first_block, first_lo, first_hi)
+ {
+ debug!("loan {:?} gets killed at {:?}", loan_idx, kill_location);
+ self.loans_out_of_scope_at_location.entry(kill_location).or_default().push(loan_idx);
+
+ // The loan dies within the first block, we're done and can early return.
+ return;
+ }
+
+ // The loan is not dead. Add successor BBs to the work list, if necessary.
+ for succ_bb in first_bb_data.terminator().successors() {
+ if self.visited.insert(succ_bb) {
+ self.visit_stack.push(succ_bb);
+ }
+ }
+
+ // We may end up visiting `first_block` again. This is not an issue: we know at this point
+ // that the loan is not killed in the `first_lo..=first_hi` range, so checking the
+ // `0..first_lo` range and the `0..first_hi` range gives the same result.
+ while let Some(block) = self.visit_stack.pop() {
+ let bb_data = &self.body[block];
+ let num_stmts = bb_data.statements.len();
+ if let Some(kill_location) =
+ self.loan_kill_location(loan_idx, loan_issued_at, block, 0, num_stmts)
+ {
+ debug!("loan {:?} gets killed at {:?}", loan_idx, kill_location);
+ self.loans_out_of_scope_at_location
+ .entry(kill_location)
+ .or_default()
+ .push(loan_idx);
+
+ // The loan dies within this block, so we don't need to visit its successors.
+ continue;
+ }
+
+ // Add successor BBs to the work list, if necessary.
+ for succ_bb in bb_data.terminator().successors() {
+ if self.visited.insert(succ_bb) {
+ self.visit_stack.push(succ_bb);
+ }
+ }
+ }
+
+ self.visited.clear();
+ assert!(self.visit_stack.is_empty(), "visit stack should be empty");
+ }
+
+ /// Returns the lowest statement in `start..=end`, where the loan goes out of scope, if any.
+ /// This is the statement where the issuing region can't reach any of the regions that are live
+ /// at this point.
+ fn loan_kill_location(
+ &self,
+ loan_idx: BorrowIndex,
+ loan_issued_at: Location,
+ block: BasicBlock,
+ start: usize,
+ end: usize,
+ ) -> Option {
+ for statement_index in start..=end {
+ let location = Location { block, statement_index };
+
+ // Check whether the issuing region can reach local regions that are live at this point:
+ // - a loan is always live at its issuing location because it can reach the issuing
+ // region, which is always live at this location.
+ if location == loan_issued_at {
+ continue;
+ }
+
+ // - the loan goes out of scope at `location` if it's not contained within any regions
+ // live at this point.
+ //
+ // FIXME: if the issuing region `i` can reach a live region `r` at point `p`, and `r` is
+ // live at point `q`, then it's guaranteed that `i` would reach `r` at point `q`.
+ // Reachability is location-insensitive, and we could take advantage of that, by jumping
+ // to a further point than just the next statement: we can jump to the furthest point
+ // within the block where `r` is live.
+ if self.regioncx.is_loan_live_at(loan_idx, location) {
+ continue;
+ }
+
+ // No live region is reachable from the issuing region: the loan is killed at this
+ // point.
+ return Some(location);
+ }
+
+ None
+ }
+}
+
impl<'a, 'tcx> Borrows<'a, 'tcx> {
pub fn new(
tcx: TyCtxt<'tcx>,
body: &'a Body<'tcx>,
- nonlexical_regioncx: &'a RegionInferenceContext<'tcx>,
+ regioncx: &'a RegionInferenceContext<'tcx>,
borrow_set: &'a BorrowSet<'tcx>,
) -> Self {
- let borrows_out_of_scope_at_location =
- calculate_borrows_out_of_scope_at_location(body, nonlexical_regioncx, borrow_set);
+ let mut borrows_out_of_scope_at_location =
+ calculate_borrows_out_of_scope_at_location(body, regioncx, borrow_set);
+
+ // The in-tree polonius analysis computes loans going out of scope using the set-of-loans
+ // model, and makes sure they're identical to the existing computation of the set-of-points
+ // model.
+ if tcx.sess.opts.unstable_opts.polonius.is_next_enabled() {
+ let mut polonius_prec = PoloniusOutOfScopePrecomputer::new(body, regioncx);
+ for (loan_idx, loan_data) in borrow_set.iter_enumerated() {
+ let issuing_region = loan_data.region;
+ let loan_issued_at = loan_data.reserve_location;
+
+ polonius_prec.precompute_loans_out_of_scope(
+ loan_idx,
+ issuing_region,
+ loan_issued_at,
+ );
+ }
+
+ assert_eq!(
+ borrows_out_of_scope_at_location, polonius_prec.loans_out_of_scope_at_location,
+ "the loans out of scope must be the same as the borrows out of scope"
+ );
+
+ borrows_out_of_scope_at_location = polonius_prec.loans_out_of_scope_at_location;
+ }
+
Borrows { tcx, body, borrow_set, borrows_out_of_scope_at_location }
}
@@ -333,6 +523,13 @@
}
}
+/// Forward dataflow computation of the set of borrows that are in scope at a particular location.
+/// - we gen the introduced loans
+/// - we kill loans on locals going out of (regular) scope
+/// - we kill the loans going out of their region's NLL scope: in NLL terms, the frontier where a
+/// region stops containing the CFG points reachable from the issuing location.
+/// - we also kill loans of conflicting places when overwriting a shared path: e.g. borrows of
+/// `a.b.c` when `a` is overwritten.
impl<'tcx> rustc_mir_dataflow::GenKillAnalysis<'tcx> for Borrows<'_, 'tcx> {
type Idx = BorrowIndex;
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/def_use.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/def_use.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/def_use.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/def_use.rs 2023-12-21 16:55:28.000000000 +0000
@@ -44,7 +44,7 @@
PlaceContext::MutatingUse(MutatingUseContext::Projection) |
// Borrows only consider their local used at the point of the borrow.
- // This won't affect the results since we use this analysis for generators
+ // This won't affect the results since we use this analysis for coroutines
// and we only care about the result at suspension points. Borrows cannot
// cross suspension points so this behavior is unproblematic.
PlaceContext::MutatingUse(MutatingUseContext::Borrow) |
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs 2023-12-21 16:55:28.000000000 +0000
@@ -8,7 +8,7 @@
use rustc_hir as hir;
use rustc_hir::def::{DefKind, Res};
use rustc_hir::intravisit::{walk_block, walk_expr, Visitor};
-use rustc_hir::{AsyncGeneratorKind, GeneratorKind, LangItem};
+use rustc_hir::{CoroutineKind, CoroutineSource, LangItem};
use rustc_infer::traits::ObligationCause;
use rustc_middle::hir::nested_filter::OnlyBodies;
use rustc_middle::mir::tcx::PlaceTy;
@@ -351,7 +351,9 @@
}
// Check if we are in a situation of `ident @ ident` where we want to suggest
// `ref ident @ ref ident` or `ref ident @ Struct { ref ident }`.
- if let Some(subpat) = sub && self.pat.is_none() {
+ if let Some(subpat) = sub
+ && self.pat.is_none()
+ {
self.visit_pat(subpat);
if self.pat.is_some() {
self.parent_pat = Some(p);
@@ -370,7 +372,9 @@
let mut finder =
ExpressionFinder { expr_span: move_span, expr: None, pat: None, parent_pat: None };
finder.visit_expr(expr);
- if let Some(span) = span && let Some(expr) = finder.expr {
+ if let Some(span) = span
+ && let Some(expr) = finder.expr
+ {
for (_, expr) in hir.parent_iter(expr.hir_id) {
if let hir::Node::Expr(expr) = expr {
if expr.span.contains(span) {
@@ -425,10 +429,7 @@
Some(hir::intravisit::FnKind::Method(..)) => "method",
Some(hir::intravisit::FnKind::Closure) => "closure",
};
- span.push_span_label(
- ident.span,
- format!("in this {descr}"),
- );
+ span.push_span_label(ident.span, format!("in this {descr}"));
err.span_note(
span,
format!(
@@ -441,15 +442,16 @@
let ty = place.ty(self.body, self.infcx.tcx).ty;
if let hir::Node::Expr(parent_expr) = parent
&& let hir::ExprKind::Call(call_expr, _) = parent_expr.kind
- && let hir::ExprKind::Path(
- hir::QPath::LangItem(LangItem::IntoIterIntoIter, _, _)
- ) = call_expr.kind
+ && let hir::ExprKind::Path(hir::QPath::LangItem(
+ LangItem::IntoIterIntoIter,
+ _,
+ _,
+ )) = call_expr.kind
{
// Do not suggest `.clone()` in a `for` loop, we already suggest borrowing.
- } else if let UseSpans::FnSelfUse {
- kind: CallKind::Normal { .. },
- ..
- } = move_spans {
+ } else if let UseSpans::FnSelfUse { kind: CallKind::Normal { .. }, .. } =
+ move_spans
+ {
// We already suggest cloning for these cases in `explain_captures`.
} else {
self.suggest_cloning(err, ty, expr, move_span);
@@ -602,10 +604,10 @@
if self.sugg_span.is_some() {
return;
}
- if let hir::StmtKind::Local(hir::Local {
- span, ty, init: None, ..
- }) = &ex.kind && span.contains(self.decl_span) {
- self.sugg_span = ty.map_or(Some(self.decl_span), |ty| Some(ty.span));
+ if let hir::StmtKind::Local(hir::Local { span, ty, init: None, .. }) = &ex.kind
+ && span.contains(self.decl_span)
+ {
+ self.sugg_span = ty.map_or(Some(self.decl_span), |ty| Some(ty.span));
}
hir::intravisit::walk_stmt(self, ex);
}
@@ -743,19 +745,14 @@
".clone()".to_owned()
};
if let Some(clone_trait_def) = tcx.lang_items().clone_trait()
- && self.infcx
- .type_implements_trait(
- clone_trait_def,
- [ty],
- self.param_env,
- )
+ && self
+ .infcx
+ .type_implements_trait(clone_trait_def, [ty], self.param_env)
.must_apply_modulo_regions()
{
let msg = if let ty::Adt(def, _) = ty.kind()
- && [
- tcx.get_diagnostic_item(sym::Arc),
- tcx.get_diagnostic_item(sym::Rc),
- ].contains(&Some(def.did()))
+ && [tcx.get_diagnostic_item(sym::Arc), tcx.get_diagnostic_item(sym::Rc)]
+ .contains(&Some(def.did()))
{
"clone the value to increment its reference count"
} else {
@@ -851,7 +848,7 @@
move_spans.var_subdiag(None, &mut err, None, |kind, var_span| {
use crate::session_diagnostics::CaptureVarCause::*;
match kind {
- Some(_) => MoveUseInGenerator { var_span },
+ Some(_) => MoveUseInCoroutine { var_span },
None => MoveUseInClosure { var_span },
}
});
@@ -897,7 +894,7 @@
let desc_place = self.describe_any_place(place.as_ref());
match kind {
Some(_) => {
- BorrowUsePlaceGenerator { place: desc_place, var_span, is_single_var: true }
+ BorrowUsePlaceCoroutine { place: desc_place, var_span, is_single_var: true }
}
None => BorrowUsePlaceClosure { place: desc_place, var_span, is_single_var: true },
}
@@ -929,8 +926,8 @@
let borrow_spans = self.borrow_spans(span, location);
let span = borrow_spans.args_or_use();
- let container_name = if issued_spans.for_generator() || borrow_spans.for_generator() {
- "generator"
+ let container_name = if issued_spans.for_coroutine() || borrow_spans.for_coroutine() {
+ "coroutine"
} else {
"closure"
};
@@ -1043,7 +1040,7 @@
|kind, var_span| {
use crate::session_diagnostics::CaptureVarCause::*;
match kind {
- Some(_) => BorrowUsePlaceGenerator {
+ Some(_) => BorrowUsePlaceCoroutine {
place: desc_place,
var_span,
is_single_var: true,
@@ -1127,7 +1124,7 @@
borrow_spans.var_subdiag(None, &mut err, Some(gen_borrow_kind), |kind, var_span| {
use crate::session_diagnostics::CaptureVarCause::*;
match kind {
- Some(_) => BorrowUsePlaceGenerator {
+ Some(_) => BorrowUsePlaceCoroutine {
place: desc_place,
var_span,
is_single_var: false,
@@ -1148,7 +1145,7 @@
let borrow_place_desc = self.describe_any_place(borrow_place.as_ref());
match kind {
Some(_) => {
- FirstBorrowUsePlaceGenerator { place: borrow_place_desc, var_span }
+ FirstBorrowUsePlaceCoroutine { place: borrow_place_desc, var_span }
}
None => FirstBorrowUsePlaceClosure { place: borrow_place_desc, var_span },
}
@@ -1162,7 +1159,7 @@
|kind, var_span| {
use crate::session_diagnostics::CaptureVarCause::*;
match kind {
- Some(_) => SecondBorrowUsePlaceGenerator { place: desc_place, var_span },
+ Some(_) => SecondBorrowUsePlaceCoroutine { place: desc_place, var_span },
None => SecondBorrowUsePlaceClosure { place: desc_place, var_span },
}
},
@@ -1328,42 +1325,160 @@
issue_span: Span,
expr_span: Span,
body_expr: Option<&'hir hir::Expr<'hir>>,
- loop_bind: Option,
+ loop_bind: Option<&'hir Ident>,
+ loop_span: Option,
+ head_span: Option,
+ pat_span: Option,
+ head: Option<&'hir hir::Expr<'hir>>,
}
impl<'hir> Visitor<'hir> for ExprFinder<'hir> {
fn visit_expr(&mut self, ex: &'hir hir::Expr<'hir>) {
- if let hir::ExprKind::Loop(hir::Block{ stmts: [stmt, ..], ..}, _, hir::LoopSource::ForLoop, _) = ex.kind &&
- let hir::StmtKind::Expr(hir::Expr{ kind: hir::ExprKind::Match(call, [_, bind, ..], _), ..}) = stmt.kind &&
- let hir::ExprKind::Call(path, _args) = call.kind &&
- let hir::ExprKind::Path(hir::QPath::LangItem(LangItem::IteratorNext, _, _, )) = path.kind &&
- let hir::PatKind::Struct(path, [field, ..], _) = bind.pat.kind &&
- let hir::QPath::LangItem(LangItem::OptionSome, _, _) = path &&
- let PatField { pat: hir::Pat{ kind: hir::PatKind::Binding(_, _, ident, ..), .. }, ..} = field &&
- self.issue_span.source_equal(call.span) {
- self.loop_bind = Some(ident.name);
+ // Try to find
+ // let result = match IntoIterator::into_iter() {
+ // mut iter => {
+ // [opt_ident]: loop {
+ // match Iterator::next(&mut iter) {
+ // None => break,
+ // Some() => ,
+ // };
+ // }
+ // }
+ // };
+ // corresponding to the desugaring of a for loop `for in { }`.
+ if let hir::ExprKind::Call(path, [arg]) = ex.kind
+ && let hir::ExprKind::Path(hir::QPath::LangItem(
+ LangItem::IntoIterIntoIter,
+ _,
+ _,
+ )) = path.kind
+ && arg.span.contains(self.issue_span)
+ {
+ // Find `IntoIterator::into_iter()`
+ self.head = Some(arg);
+ }
+ if let hir::ExprKind::Loop(
+ hir::Block { stmts: [stmt, ..], .. },
+ _,
+ hir::LoopSource::ForLoop,
+ _,
+ ) = ex.kind
+ && let hir::StmtKind::Expr(hir::Expr {
+ kind: hir::ExprKind::Match(call, [_, bind, ..], _),
+ span: head_span,
+ ..
+ }) = stmt.kind
+ && let hir::ExprKind::Call(path, _args) = call.kind
+ && let hir::ExprKind::Path(hir::QPath::LangItem(LangItem::IteratorNext, _, _)) =
+ path.kind
+ && let hir::PatKind::Struct(path, [field, ..], _) = bind.pat.kind
+ && let hir::QPath::LangItem(LangItem::OptionSome, pat_span, _) = path
+ && call.span.contains(self.issue_span)
+ {
+ // Find `` and the span for the whole `for` loop.
+ if let PatField {
+ pat: hir::Pat { kind: hir::PatKind::Binding(_, _, ident, ..), .. },
+ ..
+ } = field
+ {
+ self.loop_bind = Some(ident);
}
+ self.head_span = Some(*head_span);
+ self.pat_span = Some(pat_span);
+ self.loop_span = Some(stmt.span);
+ }
- if let hir::ExprKind::MethodCall(body_call, _recv, ..) = ex.kind &&
- body_call.ident.name == sym::next && ex.span.source_equal(self.expr_span) {
- self.body_expr = Some(ex);
+ if let hir::ExprKind::MethodCall(body_call, recv, ..) = ex.kind
+ && body_call.ident.name == sym::next
+ && recv.span.source_equal(self.expr_span)
+ {
+ self.body_expr = Some(ex);
}
hir::intravisit::walk_expr(self, ex);
}
}
- let mut finder =
- ExprFinder { expr_span: span, issue_span, loop_bind: None, body_expr: None };
+ let mut finder = ExprFinder {
+ expr_span: span,
+ issue_span,
+ loop_bind: None,
+ body_expr: None,
+ head_span: None,
+ loop_span: None,
+ pat_span: None,
+ head: None,
+ };
finder.visit_expr(hir.body(body_id).value);
- if let Some(loop_bind) = finder.loop_bind &&
- let Some(body_expr) = finder.body_expr &&
- let Some(def_id) = typeck_results.type_dependent_def_id(body_expr.hir_id) &&
- let Some(trait_did) = tcx.trait_of_item(def_id) &&
- tcx.is_diagnostic_item(sym::Iterator, trait_did) {
- err.note(format!(
- "a for loop advances the iterator for you, the result is stored in `{loop_bind}`."
+ if let Some(body_expr) = finder.body_expr
+ && let Some(loop_span) = finder.loop_span
+ && let Some(def_id) = typeck_results.type_dependent_def_id(body_expr.hir_id)
+ && let Some(trait_did) = tcx.trait_of_item(def_id)
+ && tcx.is_diagnostic_item(sym::Iterator, trait_did)
+ {
+ if let Some(loop_bind) = finder.loop_bind {
+ err.note(format!(
+ "a for loop advances the iterator for you, the result is stored in `{}`",
+ loop_bind.name,
+ ));
+ } else {
+ err.note(
+ "a for loop advances the iterator for you, the result is stored in its pattern",
+ );
+ }
+ let msg = "if you want to call `next` on a iterator within the loop, consider using \
+ `while let`";
+ if let Some(head) = finder.head
+ && let Some(pat_span) = finder.pat_span
+ && loop_span.contains(body_expr.span)
+ && loop_span.contains(head.span)
+ {
+ let sm = self.infcx.tcx.sess.source_map();
+
+ let mut sugg = vec![];
+ if let hir::ExprKind::Path(hir::QPath::Resolved(None, _)) = head.kind {
+ // A bare path doesn't need a `let` assignment, it's already a simple
+ // binding access.
+ // As a new binding wasn't added, we don't need to modify the advancing call.
+ sugg.push((loop_span.with_hi(pat_span.lo()), format!("while let Some(")));
+ sugg.push((
+ pat_span.shrink_to_hi().with_hi(head.span.lo()),
+ ") = ".to_string(),
+ ));
+ sugg.push((head.span.shrink_to_hi(), ".next()".to_string()));
+ } else {
+ // Needs a new a `let` binding.
+ let indent = if let Some(indent) = sm.indentation_before(loop_span) {
+ format!("\n{indent}")
+ } else {
+ " ".to_string()
+ };
+ let Ok(head_str) = sm.span_to_snippet(head.span) else {
+ err.help(msg);
+ return;
+ };
+ sugg.push((
+ loop_span.with_hi(pat_span.lo()),
+ format!("let iter = {head_str};{indent}while let Some("),
));
- err.help("if you want to call `next` on a iterator within the loop, consider using `while let`.");
+ sugg.push((
+ pat_span.shrink_to_hi().with_hi(head.span.hi()),
+ ") = iter.next()".to_string(),
+ ));
+ // As a new binding was added, we should change how the iterator is advanced to
+ // use the newly introduced binding.
+ if let hir::ExprKind::MethodCall(_, recv, ..) = body_expr.kind
+ && let hir::ExprKind::Path(hir::QPath::Resolved(None, ..)) = recv.kind
+ {
+ // As we introduced a `let iter = ;`, we need to change where the
+ // already borrowed value was accessed from `.next()` to
+ // `iter.next()`.
+ sugg.push((recv.span, "iter".to_string()));
+ }
+ }
+ err.multipart_suggestion(msg, sugg, Applicability::MaybeIncorrect);
+ } else {
+ err.help(msg);
+ }
}
}
@@ -1459,7 +1574,7 @@
// Get closure's arguments
let ty::Closure(_, args) = typeck_results.expr_ty(closure_expr).kind() else {
- /* hir::Closure can be a generator too */
+ /* hir::Closure can be a coroutine too */
return;
};
let sig = args.as_closure().sig();
@@ -1539,69 +1654,80 @@
fn visit_expr(&mut self, e: &'hir hir::Expr<'hir>) {
if e.span.contains(self.capture_span) {
if let hir::ExprKind::Closure(&hir::Closure {
- movability: None,
- body,
- fn_arg_span,
- fn_decl: hir::FnDecl{ inputs, .. },
- ..
- }) = e.kind &&
- let Some(hir::Node::Expr(body )) = self.hir.find(body.hir_id) {
- self.suggest_arg = "this: &Self".to_string();
- if inputs.len() > 0 {
- self.suggest_arg.push_str(", ");
- }
- self.in_closure = true;
- self.closure_arg_span = fn_arg_span;
- self.visit_expr(body);
- self.in_closure = false;
+ movability: None,
+ body,
+ fn_arg_span,
+ fn_decl: hir::FnDecl { inputs, .. },
+ ..
+ }) = e.kind
+ && let Some(hir::Node::Expr(body)) = self.hir.find(body.hir_id)
+ {
+ self.suggest_arg = "this: &Self".to_string();
+ if inputs.len() > 0 {
+ self.suggest_arg.push_str(", ");
+ }
+ self.in_closure = true;
+ self.closure_arg_span = fn_arg_span;
+ self.visit_expr(body);
+ self.in_closure = false;
}
}
if let hir::Expr { kind: hir::ExprKind::Path(path), .. } = e {
- if let hir::QPath::Resolved(_, hir::Path { segments: [seg], ..}) = path &&
- seg.ident.name == kw::SelfLower && self.in_closure {
- self.closure_change_spans.push(e.span);
+ if let hir::QPath::Resolved(_, hir::Path { segments: [seg], .. }) = path
+ && seg.ident.name == kw::SelfLower
+ && self.in_closure
+ {
+ self.closure_change_spans.push(e.span);
}
}
hir::intravisit::walk_expr(self, e);
}
fn visit_local(&mut self, local: &'hir hir::Local<'hir>) {
- if let hir::Pat { kind: hir::PatKind::Binding(_, hir_id, _ident, _), .. } = local.pat &&
- let Some(init) = local.init
+ if let hir::Pat { kind: hir::PatKind::Binding(_, hir_id, _ident, _), .. } =
+ local.pat
+ && let Some(init) = local.init
{
- if let hir::Expr { kind: hir::ExprKind::Closure(&hir::Closure {
- movability: None,
- ..
- }), .. } = init &&
- init.span.contains(self.capture_span) {
- self.closure_local_id = Some(*hir_id);
+ if let hir::Expr {
+ kind: hir::ExprKind::Closure(&hir::Closure { movability: None, .. }),
+ ..
+ } = init
+ && init.span.contains(self.capture_span)
+ {
+ self.closure_local_id = Some(*hir_id);
}
}
hir::intravisit::walk_local(self, local);
}
fn visit_stmt(&mut self, s: &'hir hir::Stmt<'hir>) {
- if let hir::StmtKind::Semi(e) = s.kind &&
- let hir::ExprKind::Call(hir::Expr { kind: hir::ExprKind::Path(path), ..}, args) = e.kind &&
- let hir::QPath::Resolved(_, hir::Path { segments: [seg], ..}) = path &&
- let Res::Local(hir_id) = seg.res &&
- Some(hir_id) == self.closure_local_id {
- let (span, arg_str) = if args.len() > 0 {
- (args[0].span.shrink_to_lo(), "self, ".to_string())
- } else {
- let span = e.span.trim_start(seg.ident.span).unwrap_or(e.span);
- (span, "(self)".to_string())
- };
- self.closure_call_changes.push((span, arg_str));
+ if let hir::StmtKind::Semi(e) = s.kind
+ && let hir::ExprKind::Call(
+ hir::Expr { kind: hir::ExprKind::Path(path), .. },
+ args,
+ ) = e.kind
+ && let hir::QPath::Resolved(_, hir::Path { segments: [seg], .. }) = path
+ && let Res::Local(hir_id) = seg.res
+ && Some(hir_id) == self.closure_local_id
+ {
+ let (span, arg_str) = if args.len() > 0 {
+ (args[0].span.shrink_to_lo(), "self, ".to_string())
+ } else {
+ let span = e.span.trim_start(seg.ident.span).unwrap_or(e.span);
+ (span, "(self)".to_string())
+ };
+ self.closure_call_changes.push((span, arg_str));
}
hir::intravisit::walk_stmt(self, s);
}
}
- if let Some(hir::Node::ImplItem(
- hir::ImplItem { kind: hir::ImplItemKind::Fn(_fn_sig, body_id), .. }
- )) = hir.find(self.mir_hir_id()) &&
- let Some(hir::Node::Expr(expr)) = hir.find(body_id.hir_id) {
+ if let Some(hir::Node::ImplItem(hir::ImplItem {
+ kind: hir::ImplItemKind::Fn(_fn_sig, body_id),
+ ..
+ })) = hir.find(self.mir_hir_id())
+ && let Some(hir::Node::Expr(expr)) = hir.find(body_id.hir_id)
+ {
let mut finder = ExpressionFinder {
capture_span: *capture_kind_span,
closure_change_spans: vec![],
@@ -1822,7 +1948,7 @@
(
Some(name),
BorrowExplanation::UsedLater(LaterUseKind::ClosureCapture, var_or_use_span, _),
- ) if borrow_spans.for_generator() || borrow_spans.for_closure() => self
+ ) if borrow_spans.for_coroutine() || borrow_spans.for_closure() => self
.report_escaping_closure_capture(
borrow_spans,
borrow_span,
@@ -1847,7 +1973,7 @@
span,
..
},
- ) if borrow_spans.for_generator() || borrow_spans.for_closure() => self
+ ) if borrow_spans.for_coroutine() || borrow_spans.for_closure() => self
.report_escaping_closure_capture(
borrow_spans,
borrow_span,
@@ -1950,8 +2076,8 @@
.unwrap_or_else(|| {
match &self.infcx.tcx.def_kind(self.mir_def_id()) {
DefKind::Closure => "enclosing closure",
- DefKind::Generator => "enclosing generator",
- kind => bug!("expected closure or generator, found {:?}", kind),
+ DefKind::Coroutine => "enclosing coroutine",
+ kind => bug!("expected closure or coroutine, found {:?}", kind),
}
.to_string()
})
@@ -1985,7 +2111,7 @@
borrow_spans.args_subdiag(&mut err, |args_span| {
crate::session_diagnostics::CaptureArgLabel::Capture {
- is_within: borrow_spans.for_generator(),
+ is_within: borrow_spans.for_coroutine(),
args_span,
}
});
@@ -2136,6 +2262,7 @@
current: usize,
found: usize,
prop_expr: Option<&'tcx hir::Expr<'tcx>>,
+ call: Option<&'tcx hir::Expr<'tcx>>,
}
impl<'tcx> Visitor<'tcx> for NestedStatementVisitor<'tcx> {
@@ -2145,6 +2272,11 @@
self.current -= 1;
}
fn visit_expr(&mut self, expr: &'tcx hir::Expr<'tcx>) {
+ if let hir::ExprKind::MethodCall(_, rcvr, _, _) = expr.kind {
+ if self.span == rcvr.span.source_callsite() {
+ self.call = Some(expr);
+ }
+ }
if self.span == expr.span.source_callsite() {
self.found = self.current;
if self.prop_expr.is_none() {
@@ -2168,25 +2300,43 @@
current: 0,
found: 0,
prop_expr: None,
+ call: None,
};
visitor.visit_stmt(stmt);
let typeck_results = self.infcx.tcx.typeck(self.mir_def_id());
- let expr_ty: Option> = visitor.prop_expr.map(|expr| typeck_results.expr_ty(expr).peel_refs());
+ let expr_ty: Option> =
+ visitor.prop_expr.map(|expr| typeck_results.expr_ty(expr).peel_refs());
- let is_format_arguments_item =
- if let Some(expr_ty) = expr_ty
- && let ty::Adt(adt, _) = expr_ty.kind() {
- self.infcx.tcx.lang_items().get(LangItem::FormatArguments) == Some(adt.did())
- } else {
- false
- };
+ let is_format_arguments_item = if let Some(expr_ty) = expr_ty
+ && let ty::Adt(adt, _) = expr_ty.kind()
+ {
+ self.infcx.tcx.lang_items().get(LangItem::FormatArguments)
+ == Some(adt.did())
+ } else {
+ false
+ };
if visitor.found == 0
&& stmt.span.contains(proper_span)
&& let Some(p) = sm.span_to_margin(stmt.span)
&& let Ok(s) = sm.span_to_snippet(proper_span)
{
+ if let Some(call) = visitor.call
+ && let hir::ExprKind::MethodCall(path, _, [], _) = call.kind
+ && path.ident.name == sym::iter
+ && let Some(ty) = expr_ty
+ {
+ err.span_suggestion_verbose(
+ path.ident.span,
+ format!(
+ "consider consuming the `{ty}` when turning it into an \
+ `Iterator`",
+ ),
+ "into_iter".to_string(),
+ Applicability::MaybeIncorrect,
+ );
+ }
if !is_format_arguments_item {
let addition = format!("let binding = {};\n{}", s, " ".repeat(p));
err.multipart_suggestion_verbose(
@@ -2224,7 +2374,7 @@
borrow_spans.args_subdiag(&mut err, |args_span| {
crate::session_diagnostics::CaptureArgLabel::Capture {
- is_within: borrow_spans.for_generator(),
+ is_within: borrow_spans.for_coroutine(),
args_span,
}
});
@@ -2340,11 +2490,17 @@
let (sugg_span, suggestion) = match tcx.sess.source_map().span_to_snippet(args_span) {
Ok(string) => {
- if string.starts_with("async ") {
- let pos = args_span.lo() + BytePos(6);
- (args_span.with_lo(pos).with_hi(pos), "move ")
- } else if string.starts_with("async|") {
- let pos = args_span.lo() + BytePos(5);
+ let coro_prefix = if string.starts_with("async") {
+ // `async` is 5 chars long. Not using `.len()` to avoid the cast from `usize` to `u32`
+ Some(5)
+ } else if string.starts_with("gen") {
+ // `gen` is 3 chars long
+ Some(3)
+ } else {
+ None
+ };
+ if let Some(n) = coro_prefix {
+ let pos = args_span.lo() + BytePos(n);
(args_span.with_lo(pos).with_hi(pos), " move")
} else {
(args_span.shrink_to_lo(), "move ")
@@ -2352,14 +2508,19 @@
}
Err(_) => (args_span, "move || "),
};
- let kind = match use_span.generator_kind() {
- Some(generator_kind) => match generator_kind {
- GeneratorKind::Async(async_kind) => match async_kind {
- AsyncGeneratorKind::Block => "async block",
- AsyncGeneratorKind::Closure => "async closure",
+ let kind = match use_span.coroutine_kind() {
+ Some(coroutine_kind) => match coroutine_kind {
+ CoroutineKind::Gen(kind) => match kind {
+ CoroutineSource::Block => "gen block",
+ CoroutineSource::Closure => "gen closure",
+ _ => bug!("gen block/closure expected, but gen function found."),
+ },
+ CoroutineKind::Async(async_kind) => match async_kind {
+ CoroutineSource::Block => "async block",
+ CoroutineSource::Closure => "async closure",
_ => bug!("async block/closure expected, but async function found."),
},
- GeneratorKind::Gen => "generator",
+ CoroutineKind::Coroutine => "coroutine",
},
None => "closure",
};
@@ -2388,7 +2549,7 @@
}
ConstraintCategory::CallArgument(_) => {
fr_name.highlight_region_name(&mut err);
- if matches!(use_span.generator_kind(), Some(GeneratorKind::Async(_))) {
+ if matches!(use_span.coroutine_kind(), Some(CoroutineKind::Async(_))) {
err.note(
"async blocks are not executed immediately and must either take a \
reference or ownership of outside variables they use",
@@ -2482,9 +2643,10 @@
/* Check if the mpi is initialized as an argument */
let mut is_argument = false;
for arg in self.body.args_iter() {
- let path = self.move_data.rev_lookup.find_local(arg);
- if mpis.contains(&path) {
- is_argument = true;
+ if let Some(path) = self.move_data.rev_lookup.find_local(arg) {
+ if mpis.contains(&path) {
+ is_argument = true;
+ }
}
}
@@ -2656,7 +2818,7 @@
loan_spans.var_subdiag(None, &mut err, Some(loan.kind), |kind, var_span| {
use crate::session_diagnostics::CaptureVarCause::*;
match kind {
- Some(_) => BorrowUseInGenerator { var_span },
+ Some(_) => BorrowUseInCoroutine { var_span },
None => BorrowUseInClosure { var_span },
}
});
@@ -2672,7 +2834,7 @@
loan_spans.var_subdiag(None, &mut err, Some(loan.kind), |kind, var_span| {
use crate::session_diagnostics::CaptureVarCause::*;
match kind {
- Some(_) => BorrowUseInGenerator { var_span },
+ Some(_) => BorrowUseInCoroutine { var_span },
None => BorrowUseInClosure { var_span },
}
});
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs 2023-12-21 16:55:28.000000000 +0000
@@ -76,10 +76,10 @@
expr_finder.visit_expr(body.value);
if let Some(mut expr) = expr_finder.result {
while let hir::ExprKind::AddrOf(_, _, inner)
- | hir::ExprKind::Unary(hir::UnOp::Deref, inner)
- | hir::ExprKind::Field(inner, _)
- | hir::ExprKind::MethodCall(_, inner, _, _)
- | hir::ExprKind::Index(inner, _, _) = &expr.kind
+ | hir::ExprKind::Unary(hir::UnOp::Deref, inner)
+ | hir::ExprKind::Field(inner, _)
+ | hir::ExprKind::MethodCall(_, inner, _, _)
+ | hir::ExprKind::Index(inner, _, _) = &expr.kind
{
expr = inner;
}
@@ -88,10 +88,7 @@
&& let hir::def::Res::Local(hir_id) = p.res
&& let Some(hir::Node::Pat(pat)) = tcx.hir().find(hir_id)
{
- err.span_label(
- pat.span,
- format!("binding `{ident}` declared here"),
- );
+ err.span_label(pat.span, format!("binding `{ident}` declared here"));
}
}
}
@@ -185,7 +182,7 @@
// Otherwise, just report the whole type (and use
// the intentionally fuzzy phrase "destructor")
ty::Closure(..) => ("destructor", "closure".to_owned()),
- ty::Generator(..) => ("destructor", "generator".to_owned()),
+ ty::Coroutine(..) => ("destructor", "coroutine".to_owned()),
_ => ("destructor", format!("type `{}`", local_decl.ty)),
};
@@ -419,7 +416,8 @@
if self.local_names[local].is_some()
&& let Some((WriteKind::StorageDeadOrDrop, place)) = kind_place
&& let Some(borrowed_local) = place.as_local()
- && self.local_names[borrowed_local].is_some() && local != borrowed_local
+ && self.local_names[borrowed_local].is_some()
+ && local != borrowed_local
{
should_note_order = true;
}
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/diagnostics/mod.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/diagnostics/mod.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/diagnostics/mod.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/diagnostics/mod.rs 2023-12-21 16:55:28.000000000 +0000
@@ -8,7 +8,7 @@
use rustc_errors::{Applicability, Diagnostic};
use rustc_hir as hir;
use rustc_hir::def::{CtorKind, Namespace};
-use rustc_hir::GeneratorKind;
+use rustc_hir::CoroutineKind;
use rustc_index::IndexSlice;
use rustc_infer::infer::LateBoundRegionConversionTime;
use rustc_middle::mir::tcx::PlaceTy;
@@ -46,6 +46,7 @@
mod region_errors;
pub(crate) use bound_region_errors::{ToUniverseInfo, UniverseInfo};
+pub(crate) use move_errors::{IllegalMoveOriginKind, MoveError};
pub(crate) use mutability_errors::AccessKind;
pub(crate) use outlives_suggestion::OutlivesSuggestionBuilder;
pub(crate) use region_errors::{ErrorConstraintInfo, RegionErrorKind, RegionErrors};
@@ -369,7 +370,7 @@
ty::Array(ty, _) | ty::Slice(ty) => {
self.describe_field_from_ty(ty, field, variant_index, including_tuple_field)
}
- ty::Closure(def_id, _) | ty::Generator(def_id, _, _) => {
+ ty::Closure(def_id, _) | ty::Coroutine(def_id, _, _) => {
// We won't be borrowck'ing here if the closure came from another crate,
// so it's safe to call `expect_local`.
//
@@ -470,7 +471,8 @@
}
}
- ty.print(printer).unwrap().into_buffer()
+ ty.print(&mut printer).unwrap();
+ printer.into_buffer()
}
/// Returns the name of the provided `Ty` (that must be a reference)'s region with a
@@ -492,7 +494,8 @@
bug!("ty for annotation of borrow region is not a reference");
};
- region.print(printer).unwrap().into_buffer()
+ region.print(&mut printer).unwrap();
+ printer.into_buffer()
}
}
@@ -501,8 +504,8 @@
pub(super) enum UseSpans<'tcx> {
/// The access is caused by capturing a variable for a closure.
ClosureUse {
- /// This is true if the captured variable was from a generator.
- generator_kind: Option,
+ /// This is true if the captured variable was from a coroutine.
+ coroutine_kind: Option,
/// The span of the args of the closure, including the `move` keyword if
/// it's present.
args_span: Span,
@@ -569,9 +572,9 @@
}
}
- pub(super) fn generator_kind(self) -> Option {
+ pub(super) fn coroutine_kind(self) -> Option {
match self {
- UseSpans::ClosureUse { generator_kind, .. } => generator_kind,
+ UseSpans::ClosureUse { coroutine_kind, .. } => coroutine_kind,
_ => None,
}
}
@@ -596,14 +599,14 @@
) {
use crate::InitializationRequiringAction::*;
use CaptureVarPathUseCause::*;
- if let UseSpans::ClosureUse { generator_kind, path_span, .. } = self {
- match generator_kind {
+ if let UseSpans::ClosureUse { coroutine_kind, path_span, .. } = self {
+ match coroutine_kind {
Some(_) => {
err.subdiagnostic(match action {
- Borrow => BorrowInGenerator { path_span },
- MatchOn | Use => UseInGenerator { path_span },
- Assignment => AssignInGenerator { path_span },
- PartialAssignment => AssignPartInGenerator { path_span },
+ Borrow => BorrowInCoroutine { path_span },
+ MatchOn | Use => UseInCoroutine { path_span },
+ Assignment => AssignInCoroutine { path_span },
+ PartialAssignment => AssignPartInCoroutine { path_span },
});
}
None => {
@@ -624,9 +627,9 @@
handler: Option<&rustc_errors::Handler>,
err: &mut Diagnostic,
kind: Option,
- f: impl FnOnce(Option, Span) -> CaptureVarCause,
+ f: impl FnOnce(Option, Span) -> CaptureVarCause,
) {
- if let UseSpans::ClosureUse { generator_kind, capture_kind_span, path_span, .. } = self {
+ if let UseSpans::ClosureUse { coroutine_kind, capture_kind_span, path_span, .. } = self {
if capture_kind_span != path_span {
err.subdiagnostic(match kind {
Some(kd) => match kd {
@@ -642,7 +645,7 @@
None => CaptureVarKind::Move { kind_span: capture_kind_span },
});
};
- let diag = f(generator_kind, path_span);
+ let diag = f(coroutine_kind, path_span);
match handler {
Some(hd) => err.eager_subdiagnostic(hd, diag),
None => err.subdiagnostic(diag),
@@ -653,15 +656,15 @@
/// Returns `false` if this place is not used in a closure.
pub(super) fn for_closure(&self) -> bool {
match *self {
- UseSpans::ClosureUse { generator_kind, .. } => generator_kind.is_none(),
+ UseSpans::ClosureUse { coroutine_kind, .. } => coroutine_kind.is_none(),
_ => false,
}
}
- /// Returns `false` if this place is not used in a generator.
- pub(super) fn for_generator(&self) -> bool {
+ /// Returns `false` if this place is not used in a coroutine.
+ pub(super) fn for_coroutine(&self) -> bool {
match *self {
- UseSpans::ClosureUse { generator_kind, .. } => generator_kind.is_some(),
+ UseSpans::ClosureUse { coroutine_kind, .. } => coroutine_kind.is_some(),
_ => false,
}
}
@@ -780,19 +783,15 @@
debug!("move_spans: moved_place={:?} location={:?} stmt={:?}", moved_place, location, stmt);
if let StatementKind::Assign(box (_, Rvalue::Aggregate(kind, places))) = &stmt.kind
- && let AggregateKind::Closure(def_id, _) | AggregateKind::Generator(def_id, _, _) = **kind
+ && let AggregateKind::Closure(def_id, _) | AggregateKind::Coroutine(def_id, _, _) =
+ **kind
{
debug!("move_spans: def_id={:?} places={:?}", def_id, places);
let def_id = def_id.expect_local();
- if let Some((args_span, generator_kind, capture_kind_span, path_span)) =
+ if let Some((args_span, coroutine_kind, capture_kind_span, path_span)) =
self.closure_span(def_id, moved_place, places)
{
- return ClosureUse {
- generator_kind,
- args_span,
- capture_kind_span,
- path_span,
- };
+ return ClosureUse { coroutine_kind, args_span, capture_kind_span, path_span };
}
}
@@ -804,11 +803,11 @@
| FakeReadCause::ForLet(Some(closure_def_id)) => {
debug!("move_spans: def_id={:?} place={:?}", closure_def_id, place);
let places = &[Operand::Move(place)];
- if let Some((args_span, generator_kind, capture_kind_span, path_span)) =
+ if let Some((args_span, coroutine_kind, capture_kind_span, path_span)) =
self.closure_span(closure_def_id, moved_place, IndexSlice::from_raw(places))
{
return ClosureUse {
- generator_kind,
+ coroutine_kind,
args_span,
capture_kind_span,
path_span,
@@ -918,21 +917,21 @@
for stmt in statements.chain(maybe_additional_statement) {
if let StatementKind::Assign(box (_, Rvalue::Aggregate(kind, places))) = &stmt.kind {
- let (&def_id, is_generator) = match kind {
+ let (&def_id, is_coroutine) = match kind {
box AggregateKind::Closure(def_id, _) => (def_id, false),
- box AggregateKind::Generator(def_id, _, _) => (def_id, true),
+ box AggregateKind::Coroutine(def_id, _, _) => (def_id, true),
_ => continue,
};
let def_id = def_id.expect_local();
debug!(
- "borrow_spans: def_id={:?} is_generator={:?} places={:?}",
- def_id, is_generator, places
+ "borrow_spans: def_id={:?} is_coroutine={:?} places={:?}",
+ def_id, is_coroutine, places
);
- if let Some((args_span, generator_kind, capture_kind_span, path_span)) =
+ if let Some((args_span, coroutine_kind, capture_kind_span, path_span)) =
self.closure_span(def_id, Place::from(target).as_ref(), places)
{
- return ClosureUse { generator_kind, args_span, capture_kind_span, path_span };
+ return ClosureUse { coroutine_kind, args_span, capture_kind_span, path_span };
} else {
return OtherUse(use_span);
}
@@ -946,7 +945,7 @@
OtherUse(use_span)
}
- /// Finds the spans of a captured place within a closure or generator.
+ /// Finds the spans of a captured place within a closure or coroutine.
/// The first span is the location of the use resulting in the capture kind of the capture
/// The second span is the location the use resulting in the captured path of the capture
fn closure_span(
@@ -954,7 +953,7 @@
def_id: LocalDefId,
target_place: PlaceRef<'tcx>,
places: &IndexSlice>,
- ) -> Option<(Span, Option, Span, Span)> {
+ ) -> Option<(Span, Option, Span, Span)> {
debug!(
"closure_span: def_id={:?} target_place={:?} places={:?}",
def_id, target_place, places
@@ -972,11 +971,11 @@
{
debug!("closure_span: found captured local {:?}", place);
let body = self.infcx.tcx.hir().body(body);
- let generator_kind = body.generator_kind();
+ let coroutine_kind = body.coroutine_kind();
return Some((
fn_decl_span,
- generator_kind,
+ coroutine_kind,
captured_place.get_capture_kind_span(self.infcx.tcx),
captured_place.get_path_span(self.infcx.tcx),
));
@@ -1123,7 +1122,8 @@
&self.infcx.tcx.sess.parse_sess.span_diagnostic,
CaptureReasonSuggest::FreshReborrow {
span: move_span.shrink_to_hi(),
- });
+ },
+ );
}
if let Some(clone_trait) = tcx.lang_items().clone_trait()
&& let trait_ref = ty::TraitRef::new(tcx, clone_trait, [ty])
@@ -1191,7 +1191,7 @@
// another message for the same span
if !is_loop_message {
move_spans.var_subdiag(None, err, None, |kind, var_span| match kind {
- Some(_) => CaptureVarCause::PartialMoveUseInGenerator { var_span, is_partial },
+ Some(_) => CaptureVarCause::PartialMoveUseInCoroutine { var_span, is_partial },
None => CaptureVarCause::PartialMoveUseInClosure { var_span, is_partial },
})
}
diff -Nru rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/diagnostics/move_errors.rs rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/diagnostics/move_errors.rs
--- rustc-1.74.1+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/diagnostics/move_errors.rs 2023-12-04 19:48:34.000000000 +0000
+++ rustc-1.75.0+dfsg0ubuntu1~bpo10/compiler/rustc_borrowck/src/diagnostics/move_errors.rs 2023-12-21 16:55:28.000000000 +0000
@@ -1,16 +1,50 @@
use rustc_errors::{Applicability, Diagnostic, DiagnosticBuilder, ErrorGuaranteed};
use rustc_middle::mir::*;
-use rustc_middle::ty;
-use rustc_mir_dataflow::move_paths::{
- IllegalMoveOrigin, IllegalMoveOriginKind, LookupResult, MoveError, MovePathIndex,
-};
-use rustc_span::{BytePos, Span};
+use rustc_middle::ty::{self, Ty};
+use rustc_mir_dataflow::move_paths::{LookupResult, MovePathIndex};
+use rustc_span::{BytePos, ExpnKind, MacroKind, Span};
use crate::diagnostics::CapturedMessageOpt;
use crate::diagnostics::{DescribePlaceOpt, UseSpans};
use crate::prefixes::PrefixSet;
use crate::MirBorrowckCtxt;
+#[derive(Debug)]
+pub enum IllegalMoveOriginKind<'tcx> {
+ /// Illegal move due to attempt to move from behind a reference.
+ BorrowedContent {
+ /// The place the reference refers to: if erroneous code was trying to
+ /// move from `(*x).f` this will be `*x`.
+ target_place: Place<'tcx>,
+ },
+
+ /// Illegal move due to attempt to move from field of an ADT that
+ /// implements `Drop`. Rust maintains invariant that all `Drop`
+ /// ADT's remain fully-initialized so that user-defined destructor
+ /// can safely read from all of the ADT's fields.
+ InteriorOfTypeWithDestructor { container_ty: Ty<'tcx> },
+
+ /// Illegal move due to attempt to move out of a slice or array.
+ InteriorOfSliceOrArray { ty: Ty<'tcx>, is_index: bool },
+}
+
+#[derive(Debug)]
+pub(crate) struct MoveError<'tcx> {
+ place: Place<'tcx>,
+ location: Location,
+ kind: IllegalMoveOriginKind<'tcx>,
+}
+
+impl<'tcx> MoveError<'tcx> {
+ pub(crate) fn new(
+ place: Place<'tcx>,
+ location: Location,
+ kind: IllegalMoveOriginKind<'tcx>,
+ ) -> Self {
+ MoveError { place, location, kind }
+ }
+}
+
// Often when desugaring a pattern match we may have many individual moves in
// MIR that are all part of one operation from the user's point-of-view. For
// example:
@@ -53,20 +87,18 @@
}
impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
- pub(crate) fn report_move_errors(&mut self, move_errors: Vec<(Place<'tcx>, MoveError<'tcx>)>) {
- let grouped_errors = self.group_move_errors(move_errors);
+ pub(crate) fn report_move_errors(&mut self) {
+ let grouped_errors = self.group_move_errors();
for error in grouped_errors {
self.report(error);
}
}
- fn group_move_errors(
- &self,
- errors: Vec<(Place<'tcx>, MoveError<'tcx>)>,
- ) -> Vec