diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 2acddfeefdf..e3708bc4853 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -1,40 +1,3 @@
# The Rust Code of Conduct
-A version of this document [can be found online](https://www.rust-lang.org/conduct.html).
-
-## Conduct
-
-**Contact**: [rust-mods@rust-lang.org](mailto:rust-mods@rust-lang.org)
-
-* We are committed to providing a friendly, safe and welcoming environment for all, regardless of level of experience, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, nationality, or other similar characteristic.
-* On IRC, please avoid using overtly sexual nicknames or other nicknames that might detract from a friendly, safe and welcoming environment for all.
-* Please be kind and courteous. There's no need to be mean or rude.
-* Respect that people have differences of opinion and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a right answer.
-* Please keep unstructured critique to a minimum. If you have solid ideas you want to experiment with, make a fork and see how it works.
-* We will exclude you from interaction if you insult, demean or harass anyone. That is not welcome behavior. We interpret the term "harassment" as including the definition in the Citizen Code of Conduct; if you have any lack of clarity about what might be included in that concept, please read their definition. In particular, we don't tolerate behavior that excludes people in socially marginalized groups.
-* Private harassment is also unacceptable. No matter who you are, if you feel you have been or are being harassed or made uncomfortable by a community member, please contact one of the channel ops or any of the [Rust moderation team][mod_team] immediately. Whether you're a regular contributor or a newcomer, we care about making this community a safe place for you and we've got your back.
-* Likewise any spamming, trolling, flaming, baiting or other attention-stealing behavior is not welcome.
-
-## Moderation
-
-
-These are the policies for upholding our community's standards of conduct. If you feel that a thread needs moderation, please contact the [Rust moderation team][mod_team].
-
-1. Remarks that violate the Rust standards of conduct, including hateful, hurtful, oppressive, or exclusionary remarks, are not allowed. (Cursing is allowed, but never targeting another user, and never in a hateful manner.)
-2. Remarks that moderators find inappropriate, whether listed in the code of conduct or not, are also not allowed.
-3. Moderators will first respond to such remarks with a warning.
-4. If the warning is unheeded, the user will be "kicked," i.e., kicked out of the communication channel to cool off.
-5. If the user comes back and continues to make trouble, they will be banned, i.e., indefinitely excluded.
-6. Moderators may choose at their discretion to un-ban the user if it was a first offense and they offer the offended party a genuine apology.
-7. If a moderator bans someone and you think it was unjustified, please take it up with that moderator, or with a different moderator, **in private**. Complaints about bans in-channel are not allowed.
-8. Moderators are held to a higher standard than other community members. If a moderator creates an inappropriate situation, they should expect less leeway than others.
-
-In the Rust community we strive to go the extra step to look out for each other. Don't just aim to be technically unimpeachable, try to be your best self. In particular, avoid flirting with offensive or sensitive issues, particularly if they're off-topic; this all too often leads to unnecessary fights, hurt feelings, and damaged trust; worse, it can drive people away from the community entirely.
-
-And if someone takes issue with something you said or did, resist the urge to be defensive. Just stop doing what it was they complained about and apologize. Even if you feel you were misinterpreted or unfairly accused, chances are good there was something you could've communicated better — remember that it's your responsibility to make your fellow Rustaceans comfortable. Everyone wants to get along and we are all here first and foremost because we want to talk about cool technology. You will find that people will be eager to assume good intent and forgive as long as you earn their trust.
-
-The enforcement policies listed above apply to all official Rust venues; including official IRC channels (#rust, #rust-internals, #rust-tools, #rust-libs, #rustc, #rust-beginners, #rust-docs, #rust-community, #rust-lang, and #cargo); GitHub repositories under rust-lang, rust-lang-nursery, and rust-lang-deprecated; and all forums under rust-lang.org (users.rust-lang.org, internals.rust-lang.org). For other projects adopting the Rust Code of Conduct, please contact the maintainers of those projects for enforcement. If you wish to use this code of conduct for your own project, consider explicitly mentioning your moderation policy or making a copy with your own moderation policy so as to avoid confusion.
-
-*Adapted from the [Node.js Policy on Trolling](http://blog.izs.me/post/30036893703/policy-on-trolling) as well as the [Contributor Covenant v1.3.0](https://www.contributor-covenant.org/version/1/3/0/).*
-
-[mod_team]: https://www.rust-lang.org/team.html#Moderation-team
+The Code of Conduct for this repository [can be found online](https://www.rust-lang.org/conduct.html).
diff --git a/rust-toolchain b/rust-toolchain
index cad47379b5d..815121d2aee 100644
--- a/rust-toolchain
+++ b/rust-toolchain
@@ -1,3 +1,3 @@
[toolchain]
-channel = "nightly-2026-02-19"
+channel = "nightly-2026-06-10"
components = ["llvm-tools", "rustc-dev"]
diff --git a/src/expr.rs b/src/expr.rs
index 76eb6d5548f..22634abb977 100644
--- a/src/expr.rs
+++ b/src/expr.rs
@@ -126,6 +126,16 @@ pub(crate) fn format_expr(
let callee_str = callee.rewrite_result(context, shape)?;
rewrite_call(context, &callee_str, args, inner_span, shape)
}
+ ast::ExprKind::Move(ref subexpr, move_kw_span) => {
+ let inner_span = mk_sp(move_kw_span.hi(), expr.span.hi());
+ rewrite_call(
+ context,
+ "move",
+ std::slice::from_ref(subexpr),
+ inner_span,
+ shape,
+ )
+ }
ast::ExprKind::Paren(ref subexpr) => rewrite_paren(context, subexpr, shape, expr.span),
ast::ExprKind::Binary(op, ref lhs, ref rhs) => {
// FIXME: format comments between operands and operator
@@ -1489,7 +1499,10 @@ pub(crate) fn can_be_overflowed_expr(
}
// Handle always block-like expressions
- ast::ExprKind::Gen(..) | ast::ExprKind::Block(..) | ast::ExprKind::Closure(..) => true,
+ ast::ExprKind::Gen(..)
+ | ast::ExprKind::Block(..)
+ | ast::ExprKind::Closure(..)
+ | ast::ExprKind::TryBlock(..) => true,
// Handle `[]` and `{}`-like expressions
ast::ExprKind::Array(..) | ast::ExprKind::Struct(..) => {
@@ -1745,7 +1758,7 @@ fn rewrite_struct_lit<'a>(
match struct_rest {
ast::StructRest::Base(expr) => Some(StructLitField::Base(&**expr)),
ast::StructRest::Rest(span) => Some(StructLitField::Rest(*span)),
- ast::StructRest::None => None,
+ ast::StructRest::None | ast::StructRest::NoneWithError(_) => None,
}
.into_iter(),
);
diff --git a/src/formatting.rs b/src/formatting.rs
index 62876841813..7f2a14f9e31 100644
--- a/src/formatting.rs
+++ b/src/formatting.rs
@@ -236,7 +236,7 @@ impl<'a, T: FormatHandler + 'a> FormatContext<'a, T> {
.file_lines()
.contains_line(&path, num_newlines + 1)
{
- source_file::append_newline(&mut visitor.buffer, self.config.style_edition());
+ source_file::append_newline(&mut visitor.buffer);
}
format_lines(
diff --git a/src/imports.rs b/src/imports.rs
index 2f26791639a..c5a2a5de2f1 100644
--- a/src/imports.rs
+++ b/src/imports.rs
@@ -429,9 +429,9 @@ impl UseTree {
attrs: Option,
) -> UseTree {
let span = if let Some(lo) = opt_lo {
- mk_sp(lo, a.span.hi())
+ mk_sp(lo, a.hi_span().hi())
} else {
- a.span
+ a.span()
};
let mut result = UseTree {
path: vec![],
@@ -456,7 +456,7 @@ impl UseTree {
let style_edition = context.config.style_edition();
match a.kind {
- UseTreeKind::Glob => {
+ UseTreeKind::Glob(_) => {
// in case of a global path and the glob starts at the root, e.g., "::*"
if a.prefix.segments.len() == 1 && leading_modsep {
let kind = UseSegmentKind::Ident("".to_owned(), None);
@@ -480,11 +480,11 @@ impl UseTree {
list.iter().map(|(tree, _)| tree),
"}",
",",
- |tree| tree.span.lo(),
- |tree| tree.span.hi(),
+ |tree| tree.prefix.span.lo(),
+ |tree| tree.hi_span().hi(),
|_| Ok("".to_owned()), // We only need comments for now.
- context.snippet_provider.span_after(a.span, "{"),
- a.span.hi(),
+ context.snippet_provider.span_after(a.span(), "{"),
+ a.hi_span().hi(),
false,
);
diff --git a/src/items.rs b/src/items.rs
index a2c0e8e0f50..484c5b50adf 100644
--- a/src/items.rs
+++ b/src/items.rs
@@ -960,6 +960,7 @@ fn format_impl_ref_and_type(
if let Some(of_trait) = of_trait.as_deref() {
result.push_str(format_defaultness(of_trait.defaultness));
+ result.push_str(format_constness(*constness));
result.push_str(format_safety(of_trait.safety));
} else {
result.push_str(format_constness(*constness));
@@ -980,7 +981,6 @@ fn format_impl_ref_and_type(
let trait_ref_overhead;
if let Some(of_trait) = of_trait.as_deref() {
- result.push_str(format_constness_right(*constness));
let polarity_str = match of_trait.polarity {
ast::ImplPolarity::Negative(_) => "!",
ast::ImplPolarity::Positive => "",
@@ -1155,6 +1155,7 @@ pub(crate) fn format_trait(
offset: Indent,
) -> RewriteResult {
let ast::Trait {
+ ref impl_restriction,
constness,
is_auto,
safety,
@@ -1166,8 +1167,9 @@ pub(crate) fn format_trait(
let mut result = String::with_capacity(128);
let header = format!(
- "{}{}{}{}trait ",
+ "{}{}{}{}{}trait ",
format_visibility(context, &item.vis),
+ format_impl_restriction(context, impl_restriction),
format_constness(constness),
format_safety(safety),
format_auto(is_auto),
@@ -1887,15 +1889,16 @@ pub(crate) fn rewrite_struct_field_prefix(
field: &ast::FieldDef,
) -> RewriteResult {
let vis = format_visibility(context, &field.vis);
+ let mut_restriction = format_mut_restriction(context, &field.mut_restriction);
let safety = format_safety(field.safety);
let type_annotation_spacing = type_annotation_spacing(context.config);
Ok(match field.ident {
Some(name) => format!(
- "{vis}{safety}{}{}:",
+ "{vis}{mut_restriction}{safety}{}{}:",
rewrite_ident(context, name),
type_annotation_spacing.0
),
- None => format!("{vis}{safety}"),
+ None => format!("{vis}{mut_restriction}{safety}"),
})
}
diff --git a/src/matches.rs b/src/matches.rs
index 4741abbe465..50c0db8ac06 100644
--- a/src/matches.rs
+++ b/src/matches.rs
@@ -571,7 +571,7 @@ fn rewrite_match_body(
// The `if ...` guard on a match arm.
fn rewrite_guard(
context: &RewriteContext<'_>,
- guard: &Option>,
+ guard: &Option>,
shape: Shape,
// The amount of space used up on this line for the pattern in
// the arm (excludes offset).
@@ -586,7 +586,7 @@ fn rewrite_guard(
.and_then(|s| s.sub_width_opt(5));
if !multiline_pattern {
if let Some(cond_shape) = cond_shape {
- if let Ok(cond_str) = guard.rewrite_result(context, cond_shape) {
+ if let Ok(cond_str) = guard.cond.rewrite_result(context, cond_shape) {
if !cond_str.contains('\n') || pattern_width <= context.config.tab_spaces() {
return Ok(format!(" if {cond_str}"));
}
@@ -597,9 +597,9 @@ fn rewrite_guard(
// Not enough space to put the guard after the pattern, try a newline.
// 3 = `if `, 5 = ` => {`
let cond_shape = Shape::indented(shape.indent.block_indent(context.config), context.config)
- .offset_left(3, guard.span)?
- .sub_width(5, guard.span)?;
- let cond_str = guard.rewrite_result(context, cond_shape)?;
+ .offset_left(3, guard.span())?
+ .sub_width(5, guard.span())?;
+ let cond_str = guard.cond.rewrite_result(context, cond_shape)?;
Ok(format!(
"{}if {}",
cond_shape.indent.to_string_with_newline(context.config),
diff --git a/src/parse/session.rs b/src/parse/session.rs
index 2a5c8f77642..83a77e73cb7 100644
--- a/src/parse/session.rs
+++ b/src/parse/session.rs
@@ -5,7 +5,6 @@ use std::sync::atomic::{AtomicBool, Ordering};
use rustc_data_structures::sync::IntoDynSyncSend;
use rustc_errors::annotate_snippet_emitter_writer::AnnotateSnippetEmitter;
use rustc_errors::emitter::{DynEmitter, Emitter, SilentEmitter, stderr_destination};
-use rustc_errors::translation::Translator;
use rustc_errors::{ColorConfig, Diag, DiagCtxt, DiagInner, Level as DiagnosticLevel};
use rustc_session::parse::ParseSess as RawParseSess;
use rustc_span::{
@@ -74,10 +73,6 @@ impl Emitter for SilentOnIgnoredFilesEmitter {
}
self.handle_non_ignoreable_error(diag);
}
-
- fn translator(&self) -> &Translator {
- self.emitter.translator()
- }
}
impl From for ColorConfig {
@@ -104,15 +99,13 @@ fn default_dcx(
ColorConfig::Never
};
- let translator = rustc_driver::default_translator();
-
let emitter: Box = if show_parse_errors {
Box::new(
- AnnotateSnippetEmitter::new(stderr_destination(emit_color), translator)
+ AnnotateSnippetEmitter::new(stderr_destination(emit_color))
.sm(Some(source_map.clone())),
)
} else {
- Box::new(SilentEmitter { translator })
+ Box::new(SilentEmitter)
};
DiagCtxt::new(Box::new(SilentOnIgnoredFilesEmitter {
has_non_ignorable_parser_errors: false,
@@ -342,10 +335,6 @@ mod tests {
fn emit_diagnostic(&mut self, _diag: DiagInner) {
self.num_emitted_errors.fetch_add(1, Ordering::Release);
}
-
- fn translator(&self) -> &Translator {
- panic!("test emitter attempted to translate a diagnostic");
- }
}
fn build_diagnostic(level: DiagnosticLevel, span: Option) -> DiagInner {
diff --git a/src/source_file.rs b/src/source_file.rs
index e30534b8fae..b0ec24f3db6 100644
--- a/src/source_file.rs
+++ b/src/source_file.rs
@@ -3,10 +3,10 @@ use std::io::{self, Write};
use std::path::Path;
use std::sync::Arc;
+use crate::NewlineStyle;
use crate::config::FileName;
use crate::emitter::{self, Emitter};
use crate::parse::session::ParseSess;
-use crate::{NewlineStyle, StyleEdition};
#[cfg(test)]
use crate::config::Config;
@@ -16,27 +16,10 @@ use crate::create_emitter;
use crate::formatting::FileRecord;
// Append a newline to the end of each file.
-pub(crate) fn append_newline(s: &mut String, style_edition: StyleEdition) {
- if style_edition >= StyleEdition::Edition2027 && s.is_empty() {
- return;
- }
+pub(crate) fn append_newline(s: &mut String) {
s.push('\n');
}
-#[test]
-fn append_newline_adds_newlines_before_2027() {
- let mut text = String::new();
- append_newline(&mut text, StyleEdition::Edition2024);
- assert_eq!(text, "\n");
-}
-
-#[test]
-fn append_newline_leaves_empty_files_empty_in_2027() {
- let mut text = String::new();
- append_newline(&mut text, StyleEdition::Edition2027);
- assert!(text.is_empty());
-}
-
#[cfg(test)]
pub(crate) fn write_all_files(
source_file: &[FileRecord],
diff --git a/src/spanned.rs b/src/spanned.rs
index f7486e195df..90331ce926e 100644
--- a/src/spanned.rs
+++ b/src/spanned.rs
@@ -1,7 +1,7 @@
use std::cmp::max;
use rustc_ast::ast;
-use rustc_span::{Span, source_map};
+use rustc_span::Span;
use crate::macros::MacroArg;
use crate::utils::{mk_sp, outer_attributes};
@@ -17,7 +17,7 @@ impl Spanned for Box {
}
}
-impl Spanned for source_map::Spanned {
+impl Spanned for rustc_span::Spanned {
fn span(&self) -> Span {
self.span
}
diff --git a/src/test/mod.rs b/src/test/mod.rs
index 20193df5a7c..291ac8fa078 100644
--- a/src/test/mod.rs
+++ b/src/test/mod.rs
@@ -49,7 +49,6 @@ const FILE_SKIP_LIST: &[&str] = &[
"cfg_mod/bar.rs",
"cfg_mod/foo.rs",
"cfg_mod/wasm32.rs",
- "reorder_modules_2027",
"skip/foo.rs",
];
diff --git a/src/types.rs b/src/types.rs
index 3ce99556c79..92a649bf634 100644
--- a/src/types.rs
+++ b/src/types.rs
@@ -484,16 +484,6 @@ impl Rewrite for ast::WherePredicate {
ref lifetime,
ref bounds,
}) => rewrite_bounded_lifetime(lifetime, bounds, self.span, context, shape)?,
- ast::WherePredicateKind::EqPredicate(ast::WhereEqPredicate {
- ref lhs_ty,
- ref rhs_ty,
- ..
- }) => {
- let lhs_ty_str = lhs_ty
- .rewrite_result(context, shape)
- .map(|lhs| lhs + " =")?;
- rewrite_assign_rhs(context, lhs_ty_str, &**rhs_ty, &RhsAssignKind::Ty, shape)?
- }
};
let mut result = String::with_capacity(attrs_str.len() + pred_str.len() + 1);
@@ -1030,6 +1020,14 @@ impl Rewrite for ast::Ty {
let pat = pat.rewrite_result(context, shape)?;
Ok(format!("{ty} is {pat}"))
}
+ ast::TyKind::FieldOf(ref ty, ref variant, ref field) => {
+ let ty = ty.rewrite_result(context, shape)?;
+ if let Some(variant) = variant {
+ Ok(format!("builtin # field_of({ty}, {variant}.{field})"))
+ } else {
+ Ok(format!("builtin # field_of({ty}, {field})"))
+ }
+ }
ast::TyKind::UnsafeBinder(ref binder) => {
let mut result = String::new();
if binder.generic_params.is_empty() {
diff --git a/src/utils.rs b/src/utils.rs
index e7633030797..d0e27a908b8 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -2,8 +2,8 @@ use std::borrow::Cow;
use rustc_ast::YieldKind;
use rustc_ast::ast::{
- self, Attribute, MetaItem, MetaItemInner, MetaItemKind, NodeId, Path, Visibility,
- VisibilityKind,
+ self, Attribute, ImplRestriction, MetaItem, MetaItemInner, MetaItemKind, MutRestriction,
+ NodeId, Path, RestrictionKind, Visibility, VisibilityKind,
};
use rustc_ast_pretty::pprust;
use rustc_span::{BytePos, LocalExpnId, Span, Symbol, SyntaxContext, sym, symbol};
@@ -74,6 +74,47 @@ pub(crate) fn format_visibility(
}
}
+pub(crate) fn format_impl_restriction(
+ context: &RewriteContext<'_>,
+ impl_restriction: &ImplRestriction,
+) -> String {
+ format_restriction("impl", context, &impl_restriction.kind)
+}
+
+pub(crate) fn format_mut_restriction(
+ context: &RewriteContext<'_>,
+ mut_restriction: &MutRestriction,
+) -> String {
+ format_restriction("mut", context, &mut_restriction.kind)
+}
+
+fn format_restriction(
+ kw: &'static str,
+ context: &RewriteContext<'_>,
+ restriction: &RestrictionKind,
+) -> String {
+ match restriction {
+ RestrictionKind::Unrestricted => String::new(),
+ RestrictionKind::Restricted {
+ ref path,
+ id: _,
+ shorthand,
+ } => {
+ let Path { ref segments, .. } = **path;
+ let mut segments_iter = segments.iter().map(|seg| rewrite_ident(context, seg.ident));
+ if path.is_global() && segments_iter.next().is_none() {
+ panic!("non-global path in {kw}(restricted)?");
+ }
+ // FIXME use `segments_iter.intersperse("::").collect::()` once
+ // `#![feature(iter_intersperse)]` is re-stabilized.
+ let path = itertools::join(segments_iter, "::");
+ let in_str = if *shorthand { "" } else { "in " };
+
+ format!("{kw}({in_str}{path}) ")
+ }
+ }
+}
+
#[inline]
pub(crate) fn format_coro(coroutine_kind: &ast::CoroutineKind) -> &'static str {
match coroutine_kind {
@@ -91,14 +132,6 @@ pub(crate) fn format_constness(constness: ast::Const) -> &'static str {
}
}
-#[inline]
-pub(crate) fn format_constness_right(constness: ast::Const) -> &'static str {
- match constness {
- ast::Const::Yes(..) => " const",
- ast::Const::No => "",
- }
-}
-
#[inline]
pub(crate) fn format_defaultness(defaultness: ast::Defaultness) -> &'static str {
match defaultness {
@@ -528,6 +561,7 @@ pub(crate) fn is_block_expr(context: &RewriteContext<'_>, expr: &ast::Expr, repr
| ast::ExprKind::Field(..)
| ast::ExprKind::IncludedBytes(..)
| ast::ExprKind::InlineAsm(..)
+ | ast::ExprKind::Move(..)
| ast::ExprKind::OffsetOf(..)
| ast::ExprKind::UnsafeBinderCast(..)
| ast::ExprKind::Let(..)
diff --git a/src/vertical.rs b/src/vertical.rs
index 21e34d29710..fd9a4a7db6a 100644
--- a/src/vertical.rs
+++ b/src/vertical.rs
@@ -198,7 +198,7 @@ fn struct_field_prefix_max_min_width(
.rewrite_prefix(context, shape)
.map(|field_str| trimmed_last_line_width(&field_str))
})
- .fold_ok((0, ::std::usize::MAX), |(max_len, min_len), len| {
+ .fold_ok((0, usize::MAX), |(max_len, min_len), len| {
(cmp::max(max_len, len), cmp::min(min_len, len))
})
.unwrap_or((0, 0))
diff --git a/src/visitor.rs b/src/visitor.rs
index 4072a1d8697..55f9a4d8c8b 100644
--- a/src/visitor.rs
+++ b/src/visitor.rs
@@ -673,11 +673,11 @@ impl<'b, 'a: 'b> FmtVisitor<'a> {
}
// TODO(calebcartwright): consider enabling box_patterns feature gate
- match (&ai.kind, visitor_kind) {
- (ast::AssocItemKind::Const(c), AssocTraitItem) => {
+ match (&ai.kind, assoc_ctxt) {
+ (ast::AssocItemKind::Const(c), visit::AssocCtxt::Trait) => {
self.visit_static(&StaticParts::from_trait_item(ai, c.ident))
}
- (ast::AssocItemKind::Const(c), AssocImplItem) => {
+ (ast::AssocItemKind::Const(c), visit::AssocCtxt::Impl { .. }) => {
self.visit_static(&StaticParts::from_impl_item(ai, c.ident))
}
(ast::AssocItemKind::Fn(ref fn_kind), _) => {
@@ -722,7 +722,11 @@ impl<'b, 'a: 'b> FmtVisitor<'a> {
(ast::AssocItemKind::MacCall(ref mac), _) => {
self.visit_mac(mac, MacroPosition::Item);
}
- _ => unreachable!(),
+ (ast::AssocItemKind::Delegation(_) | ast::AssocItemKind::DelegationMac(_), _) => {
+ // TODO(ytmimi) #![feature(fn_delegation)]
+ // add formatting for `AssocItemKind::Delegation` and `AssocItemKind::DelegationMac`
+ self.push_rewrite(ai.span, None);
+ }
}
}
diff --git a/tests/config/newline_file.toml b/tests/config/newline_file.toml
deleted file mode 100644
index 3501136812c..00000000000
--- a/tests/config/newline_file.toml
+++ /dev/null
@@ -1 +0,0 @@
-style_edition = "2024"
diff --git a/tests/source/const_trait.rs b/tests/source/const_trait.rs
deleted file mode 100644
index 99414a74f25..00000000000
--- a/tests/source/const_trait.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-#![feature(trait_alias, const_trait_impl)]
-
-const trait Bar {}
-
-const trait Foo = Bar;
-
-impl const Bar for () {}
-
-// const impl gets reformatted to impl const.. for now
-const impl Bar for u8 {}
-
-struct X;
-
-const impl X {}
diff --git a/tests/source/impl-restriction.rs b/tests/source/impl-restriction.rs
new file mode 100644
index 00000000000..3203626eaaa
--- /dev/null
+++ b/tests/source/impl-restriction.rs
@@ -0,0 +1,42 @@
+#![feature(impl_restriction)]
+
+pub
+impl(crate)
+trait Foo {}
+
+pub impl
+( in
+crate )
+trait
+Bar
+{}
+
+pub
+impl ( in foo
+::
+bar )
+trait Baz {}
+
+pub
+impl
+(self)
+const
+trait QuxConst {}
+
+pub
+impl(
+super
+) auto
+trait QuxAuto {}
+
+pub
+impl
+(in crate) unsafe
+trait QuxUnsafe {}
+
+pub
+impl
+(in super
+::foo)
+const unsafe
+trait QuxConstUnsafe {}
diff --git a/tests/source/mut-restriction.rs b/tests/source/mut-restriction.rs
new file mode 100644
index 00000000000..990cbd476bf
--- /dev/null
+++ b/tests/source/mut-restriction.rs
@@ -0,0 +1,108 @@
+#![feature(mut_restrictions, unsafe_fields)]
+
+struct FooS {
+ pub
+ mut(crate)
+ field1: (),
+ pub
+ mut(crate
+ )
+ unsafe
+ field2: (),
+}
+
+struct BazS {
+ pub
+ mut ( in foo
+ ::
+ bar )
+ field1: (),
+ pub
+ mut(
+ in foo
+ ::
+ bar
+ ) unsafe
+ field2: (),
+}
+
+struct FooS2(
+ pub
+ mut(crate)
+ (),
+);
+
+struct BazS2(
+ pub
+ mut ( in foo
+ ::
+ bar )
+ (),
+);
+
+enum Enum {
+ Foo {
+ pub(crate) mut(self)
+ field1: (),
+ pub
+ mut(self
+ )
+ unsafe
+ field2: (),
+ },
+ Baz {
+ pub
+ mut ( in foo
+ ::
+ bar )
+ field1: (),
+ pub(
+ crate
+ )
+ mut(
+ in foo
+ ::
+ bar
+ ) unsafe field2: (),
+ },
+ FooT(
+ pub(crate)
+ mut(self)
+ (),
+ ),
+ BazT(
+ pub(crate
+ )
+ mut ( in foo
+ ::
+ bar )
+ (),
+ ),
+
+}
+
+union Union {
+ pub
+ mut(crate)
+ field1: (),
+ pub(crate
+ )
+ mut ( in foo
+ ::
+ bar )
+ field2: (),
+ pub
+ mut(crate
+ )
+ unsafe
+ field3: (),
+ pub(
+ crate
+ )
+ mut(
+ in foo
+ ::
+ bar
+ ) unsafe
+ field4: (),
+}
diff --git a/tests/source/newline_file.rs b/tests/source/newline_file.rs
deleted file mode 100644
index 8b137891791..00000000000
--- a/tests/source/newline_file.rs
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/tests/source/reorder_modules_2027/disabled_style_edition_2027.rs b/tests/source/reorder_modules/disabled_style_edition_2027.rs
similarity index 100%
rename from tests/source/reorder_modules_2027/disabled_style_edition_2027.rs
rename to tests/source/reorder_modules/disabled_style_edition_2027.rs
diff --git a/tests/source/reorder_modules_2027/enabled_style_edition_2027.rs b/tests/source/reorder_modules/enabled_style_edition_2027.rs
similarity index 100%
rename from tests/source/reorder_modules_2027/enabled_style_edition_2027.rs
rename to tests/source/reorder_modules/enabled_style_edition_2027.rs
diff --git a/tests/source/reorder_modules_2027/A2/mod.rs b/tests/source/reorder_modules_2027/A2/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/ABCD/mod.rs b/tests/source/reorder_modules_2027/ABCD/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/ZYXW/mod.rs b/tests/source/reorder_modules_2027/ZYXW/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/ZYXW_/mod.rs b/tests/source/reorder_modules_2027/ZYXW_/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/ZY_XW/mod.rs b/tests/source/reorder_modules_2027/ZY_XW/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/Z_YXW/mod.rs b/tests/source/reorder_modules_2027/Z_YXW/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/_ZYXW/mod.rs b/tests/source/reorder_modules_2027/_ZYXW/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/_abcd/mod.rs b/tests/source/reorder_modules_2027/_abcd/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/a1/mod.rs b/tests/source/reorder_modules_2027/a1/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/u128/mod.rs b/tests/source/reorder_modules_2027/u128/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/u16/mod.rs b/tests/source/reorder_modules_2027/u16/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/u256/mod.rs b/tests/source/reorder_modules_2027/u256/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/u32/mod.rs b/tests/source/reorder_modules_2027/u32/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/u64/mod.rs b/tests/source/reorder_modules_2027/u64/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/u8/mod.rs b/tests/source/reorder_modules_2027/u8/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/u_zzz/mod.rs b/tests/source/reorder_modules_2027/u_zzz/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/ua/mod.rs b/tests/source/reorder_modules_2027/ua/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/usize/mod.rs b/tests/source/reorder_modules_2027/usize/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/uz/mod.rs b/tests/source/reorder_modules_2027/uz/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/v0/mod.rs b/tests/source/reorder_modules_2027/v0/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/v00/mod.rs b/tests/source/reorder_modules_2027/v00/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/v000/mod.rs b/tests/source/reorder_modules_2027/v000/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/v001/mod.rs b/tests/source/reorder_modules_2027/v001/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/v009/mod.rs b/tests/source/reorder_modules_2027/v009/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/v00t/mod.rs b/tests/source/reorder_modules_2027/v00t/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/v01/mod.rs b/tests/source/reorder_modules_2027/v01/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/v010/mod.rs b/tests/source/reorder_modules_2027/v010/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/v09/mod.rs b/tests/source/reorder_modules_2027/v09/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/v0s/mod.rs b/tests/source/reorder_modules_2027/v0s/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/v0u/mod.rs b/tests/source/reorder_modules_2027/v0u/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/v1/mod.rs b/tests/source/reorder_modules_2027/v1/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/v10/mod.rs b/tests/source/reorder_modules_2027/v10/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/v9/mod.rs b/tests/source/reorder_modules_2027/v9/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/w005s09t/mod.rs b/tests/source/reorder_modules_2027/w005s09t/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/w5s009t/mod.rs b/tests/source/reorder_modules_2027/w5s009t/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/x64/mod.rs b/tests/source/reorder_modules_2027/x64/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/x86/mod.rs b/tests/source/reorder_modules_2027/x86/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/x86_128/mod.rs b/tests/source/reorder_modules_2027/x86_128/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/x86_32/mod.rs b/tests/source/reorder_modules_2027/x86_32/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/x86_64/mod.rs b/tests/source/reorder_modules_2027/x86_64/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/reorder_modules_2027/x87/mod.rs b/tests/source/reorder_modules_2027/x87/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/source/try_block.rs b/tests/source/try_block.rs
index e324a133175..62f0492f966 100644
--- a/tests/source/try_block.rs
+++ b/tests/source/try_block.rs
@@ -27,5 +27,13 @@ fn baz() -> Option {
let x: Option = try { baz()?; baz()?; baz()?; 7 };
+ let _ = overflowed_expr(
+ x,
+ try {
+ foo()?;
+ bar()?;
+ },
+ );
+
return None;
}
diff --git a/tests/source/try_blocks_heterogeneous.rs b/tests/source/try_blocks_heterogeneous.rs
index 7a1135cfbc7..056bedafef6 100644
--- a/tests/source/try_blocks_heterogeneous.rs
+++ b/tests/source/try_blocks_heterogeneous.rs
@@ -35,5 +35,15 @@ fn baz() -> Option {
let x = try bikeshed Foo {};
+ let x = try bikeshed Result {};
+
+ let _ = overflowed_expr(
+ x,
+ try bikeshed Option<_> {
+ foo()?;
+ bar()?;
+ },
+ );
+
return None;
}
diff --git a/tests/target/const_trait.rs b/tests/target/const_trait.rs
index 337a4cf4140..bb6ba1cd85b 100644
--- a/tests/target/const_trait.rs
+++ b/tests/target/const_trait.rs
@@ -4,10 +4,7 @@ const trait Bar {}
const trait Foo = Bar;
-impl const Bar for () {}
-
-// const impl gets reformatted to impl const.. for now
-impl const Bar for u8 {}
+const impl Bar for () {}
struct X;
diff --git a/tests/target/field-representing-types.rs b/tests/target/field-representing-types.rs
new file mode 100644
index 00000000000..a31ccbfb461
--- /dev/null
+++ b/tests/target/field-representing-types.rs
@@ -0,0 +1,2 @@
+type FRT = builtin # field_of(Type, ident);
+type FRT2 = builtin # field_of(Type, ident);
diff --git a/tests/target/impl-restriction.rs b/tests/target/impl-restriction.rs
new file mode 100644
index 00000000000..f5e1f3b7f6b
--- /dev/null
+++ b/tests/target/impl-restriction.rs
@@ -0,0 +1,15 @@
+#![feature(impl_restriction)]
+
+pub impl(crate) trait Foo {}
+
+pub impl(in crate) trait Bar {}
+
+pub impl(in foo::bar) trait Baz {}
+
+pub impl(self) const trait QuxConst {}
+
+pub impl(super) auto trait QuxAuto {}
+
+pub impl(in crate) unsafe trait QuxUnsafe {}
+
+pub impl(in super::foo) const unsafe trait QuxConstUnsafe {}
diff --git a/tests/target/impls.rs b/tests/target/impls.rs
index 99e02990e41..71dfb5591e7 100644
--- a/tests/target/impls.rs
+++ b/tests/target/impls.rs
@@ -244,7 +244,7 @@ where
}
// #4084
-impl const std::default::Default for Struct {
+const impl std::default::Default for Struct {
#[inline]
fn default() -> Self {
Self { f: 12.5 }
diff --git a/tests/target/issue_6513.rs b/tests/target/issue_6513.rs
new file mode 100644
index 00000000000..827d4ccdf27
--- /dev/null
+++ b/tests/target/issue_6513.rs
@@ -0,0 +1,10 @@
+#![feature(fn_delegation)]
+
+struct Ty;
+impl Ty {
+ reuse std::convert::identity;
+}
+
+trait Trait {
+ reuse std::convert::identity;
+}
diff --git a/tests/target/mut-restriction.rs b/tests/target/mut-restriction.rs
new file mode 100644
index 00000000000..3ac5d6ae912
--- /dev/null
+++ b/tests/target/mut-restriction.rs
@@ -0,0 +1,35 @@
+#![feature(mut_restrictions, unsafe_fields)]
+
+struct FooS {
+ pub mut(crate) field1: (),
+ pub mut(crate) unsafe field2: (),
+}
+
+struct BazS {
+ pub mut(in foo::bar) field1: (),
+ pub mut(in foo::bar) unsafe field2: (),
+}
+
+struct FooS2(pub mut(crate) ());
+
+struct BazS2(pub mut(in foo::bar) ());
+
+enum Enum {
+ Foo {
+ pub(crate) mut(self) field1: (),
+ pub mut(self) unsafe field2: (),
+ },
+ Baz {
+ pub mut(in foo::bar) field1: (),
+ pub(crate) mut(in foo::bar) unsafe field2: (),
+ },
+ FooT(pub(crate) mut(self) ()),
+ BazT(pub(crate) mut(in foo::bar) ()),
+}
+
+union Union {
+ pub mut(crate) field1: (),
+ pub(crate) mut(in foo::bar) field2: (),
+ pub mut(crate) unsafe field3: (),
+ pub(crate) mut(in foo::bar) unsafe field4: (),
+}
diff --git a/tests/target/newline_file.rs b/tests/target/newline_file.rs
deleted file mode 100644
index 8b137891791..00000000000
--- a/tests/target/newline_file.rs
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/tests/target/reorder_modules_2027/disabled_style_edition_2027.rs b/tests/target/reorder_modules/disabled_style_edition_2027.rs
similarity index 100%
rename from tests/target/reorder_modules_2027/disabled_style_edition_2027.rs
rename to tests/target/reorder_modules/disabled_style_edition_2027.rs
diff --git a/tests/target/reorder_modules_2027/enabled_style_edition_2027.rs b/tests/target/reorder_modules/enabled_style_edition_2027.rs
similarity index 100%
rename from tests/target/reorder_modules_2027/enabled_style_edition_2027.rs
rename to tests/target/reorder_modules/enabled_style_edition_2027.rs
diff --git a/tests/target/reorder_modules_2027/A2/mod.rs b/tests/target/reorder_modules_2027/A2/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/ABCD/mod.rs b/tests/target/reorder_modules_2027/ABCD/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/ZYXW/mod.rs b/tests/target/reorder_modules_2027/ZYXW/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/ZYXW_/mod.rs b/tests/target/reorder_modules_2027/ZYXW_/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/ZY_XW/mod.rs b/tests/target/reorder_modules_2027/ZY_XW/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/Z_YXW/mod.rs b/tests/target/reorder_modules_2027/Z_YXW/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/_ZYXW/mod.rs b/tests/target/reorder_modules_2027/_ZYXW/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/_abcd/mod.rs b/tests/target/reorder_modules_2027/_abcd/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/a1/mod.rs b/tests/target/reorder_modules_2027/a1/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/u128/mod.rs b/tests/target/reorder_modules_2027/u128/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/u16/mod.rs b/tests/target/reorder_modules_2027/u16/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/u256/mod.rs b/tests/target/reorder_modules_2027/u256/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/u32/mod.rs b/tests/target/reorder_modules_2027/u32/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/u64/mod.rs b/tests/target/reorder_modules_2027/u64/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/u8/mod.rs b/tests/target/reorder_modules_2027/u8/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/u_zzz/mod.rs b/tests/target/reorder_modules_2027/u_zzz/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/ua/mod.rs b/tests/target/reorder_modules_2027/ua/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/usize/mod.rs b/tests/target/reorder_modules_2027/usize/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/uz/mod.rs b/tests/target/reorder_modules_2027/uz/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/v0/mod.rs b/tests/target/reorder_modules_2027/v0/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/v00/mod.rs b/tests/target/reorder_modules_2027/v00/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/v000/mod.rs b/tests/target/reorder_modules_2027/v000/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/v001/mod.rs b/tests/target/reorder_modules_2027/v001/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/v009/mod.rs b/tests/target/reorder_modules_2027/v009/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/v00t/mod.rs b/tests/target/reorder_modules_2027/v00t/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/v01/mod.rs b/tests/target/reorder_modules_2027/v01/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/v010/mod.rs b/tests/target/reorder_modules_2027/v010/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/v09/mod.rs b/tests/target/reorder_modules_2027/v09/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/v0s/mod.rs b/tests/target/reorder_modules_2027/v0s/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/v0u/mod.rs b/tests/target/reorder_modules_2027/v0u/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/v1/mod.rs b/tests/target/reorder_modules_2027/v1/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/v10/mod.rs b/tests/target/reorder_modules_2027/v10/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/v9/mod.rs b/tests/target/reorder_modules_2027/v9/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/w005s09t/mod.rs b/tests/target/reorder_modules_2027/w005s09t/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/w5s009t/mod.rs b/tests/target/reorder_modules_2027/w5s009t/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/x64/mod.rs b/tests/target/reorder_modules_2027/x64/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/x86/mod.rs b/tests/target/reorder_modules_2027/x86/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/x86_128/mod.rs b/tests/target/reorder_modules_2027/x86_128/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/x86_32/mod.rs b/tests/target/reorder_modules_2027/x86_32/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/x86_64/mod.rs b/tests/target/reorder_modules_2027/x86_64/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/reorder_modules_2027/x87/mod.rs b/tests/target/reorder_modules_2027/x87/mod.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/tests/target/try_block.rs b/tests/target/try_block.rs
index 61da123b735..f9d9909f524 100644
--- a/tests/target/try_block.rs
+++ b/tests/target/try_block.rs
@@ -26,5 +26,10 @@ fn baz() -> Option {
7
};
+ let _ = overflowed_expr(x, try {
+ foo()?;
+ bar()?;
+ });
+
return None;
}
diff --git a/tests/target/try_blocks_heterogeneous.rs b/tests/target/try_blocks_heterogeneous.rs
index 018d53ed35e..ce0a3cf704b 100644
--- a/tests/target/try_blocks_heterogeneous.rs
+++ b/tests/target/try_blocks_heterogeneous.rs
@@ -37,5 +37,16 @@ fn baz() -> Option {
let x =
try bikeshed Foo {};
+ let x = try bikeshed Result<
+ VeryVeryVeryVeryVeryLongTypeForSuccess,
+ VeryVeryVeryVeryVeryLongTypeForFailure,
+ > {
+ };
+
+ let _ = overflowed_expr(x, try bikeshed Option<_> {
+ foo()?;
+ bar()?;
+ });
+
return None;
}
diff --git a/tests/target/type.rs b/tests/target/type.rs
index 623192b72b8..4855f726ea3 100644
--- a/tests/target/type.rs
+++ b/tests/target/type.rs
@@ -153,7 +153,7 @@ const fn not_quite_const() -> i32 {
::CONST
}
-impl const T for U {}
+const impl T for U {}
fn apit(_: impl [const] T) {}