Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove special handling of obsolete impl Trait for .. syntax #121072

Closed
wants to merge 1 commit into from

Conversation

nnethercote
Copy link
Contributor

@nnethercote nnethercote commented Feb 14, 2024

The ancient (pre-1.0) RFC 19 suggested using impl Trait for .. syntax for default traits. That was later changed to auto trait Trait {} syntax. The parser has special treatment for the .. syntax, suggesting the auto syntax.

Given that default traits have not be stabilized and the .. syntax is so old, the special case seems unnecessary, and it gets in the way of adding ErrorGuaranteed to TyKind::Err. This commit removes it and the tests.

r? @oli-obk

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 14, 2024
@rustbot
Copy link
Collaborator

rustbot commented Feb 14, 2024

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Some changes occurred in src/tools/rustfmt

cc @rust-lang/rustfmt

@nnethercote
Copy link
Contributor Author

Best reviewed one commit at a time.

@nnethercote nnethercote changed the title Remove special handling for impl Trait for .. syntax errors. Add an ErrorGuaranteed to ast::TyKind::Err. Feb 14, 2024
@@ -588,15 +588,8 @@ impl<'a> Parser<'a> {
let has_for = self.eat_keyword(kw::For);
let missing_for_span = self.prev_token.span.between(self.token.span);

let ty_second = if self.token == token::DotDot {
// We need to report this error after `cfg` expansion for compatibility reasons
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This suggests that we intend the following (historically wrongly gated 😭) to pass:

#[cfg(dont)]
impl Trait for .. {}

given that this should have emitted a future compat warning (from a quick test it doesn't seem to do that though????, I might be doing it wrong though)

but this is a breaking change (a probably justified one, but one)

maybe this should just use some dummy node in the meantime to not block this

@rust-log-analyzer

This comment has been minimized.

@petrochenkov
Copy link
Contributor

This is related to #65860.

@oli-obk
Copy link
Contributor

oli-obk commented Feb 14, 2024

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 14, 2024
Add an `ErrorGuaranteed` to `ast::TyKind::Err`.

This makes it more like `hir::TyKind::Err`, and avoids a `span_delayed_bug` call in `LoweringContext::lower_ty_direct`.

r? `@oli-obk`
@bors
Copy link
Contributor

bors commented Feb 14, 2024

⌛ Trying commit 3a97622 with merge e2d5da3...

@bors
Copy link
Contributor

bors commented Feb 14, 2024

☀️ Try build successful - checks-actions
Build commit: e2d5da3 (e2d5da3bc6e298ce5f33ab9bd4e47f6a307ec8d0)

@oli-obk
Copy link
Contributor

oli-obk commented Feb 14, 2024

@craterbot check

@craterbot
Copy link
Collaborator

👌 Experiment pr-121072 created and queued.
🤖 Automatically detected try build e2d5da3
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 14, 2024
@nnethercote
Copy link
Contributor Author

I don't want to hold up the TyKind::Err changes on the impl Trait for .. syntax changes. So I've filed #121109 for just the TyKind::Err changes, and this PR can morph into being about the .. syntax changes.

@nnethercote nnethercote changed the title Add an ErrorGuaranteed to ast::TyKind::Err. Remove special handling of obsolete impl Trait for .. syntax Feb 14, 2024
@craterbot
Copy link
Collaborator

🚧 Experiment pr-121072 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Collaborator

🎉 Experiment pr-121072 is completed!
📊 77 regressed and 4 fixed (417038 total)
📰 Open the full report.

⚠️ If you notice any spurious failure please add them to the blacklist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Feb 20, 2024
@nnethercote
Copy link
Contributor Author

The crater run has 77 failures, which boil down to three crates.

crossbeam

Most of the failures are from this crate, versions 0.2.9, 0.2.10, 0.3.0, which are all over six years old. Current version is 0.8.4.

[INFO] [stdout] error: expected type, found `..`
[INFO] [stdout]   --> /opt/rustwide/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/crossbeam-0.2.9/src/mem/cache_padded.rs:41:28
[INFO] [stdout]    |
[INFO] [stdout] 41 | unsafe impl ZerosValid for .. {}
[INFO] [stdout]    |                            ^^ expected type
[INFO] [stdout] error: expected type, found `..`
[INFO] [stdout]   --> /opt/rustwide/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/crossbeam-0.2.10/src/mem/cache_padded.rs:49:28
[INFO] [stdout]    |
[INFO] [stdout] 49 | unsafe impl ZerosValid for .. {}
[INFO] [stdout]    |                            ^^ expected type
[INFO] [stdout] error: expected type, found `..`
[INFO] [stdout]   --> /opt/rustwide/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/crossbeam-0.3.0/src/cache_padded.rs:49:28
[INFO] [stdout]    |
[INFO] [stdout] 49 | unsafe impl ZerosValid for .. {}
[INFO] [stdout]    |                            ^^ expected type

dimensioned

We see a few failures with version 0.6.0, which is seven years old. Current version is 0.8.0, which is two years old. The crate has 220,000 downloads for all time.

[INFO] [stdout] error: expected type, found `..`
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/dimensioned-0.6.0/src/traits.rs:129:17
[INFO] [stdout]     |
[INFO] [stdout] 129 | impl NotDim for .. {}
[INFO] [stdout]     |                 ^^ expected type

packed

We see a couple of failures with version 0.4.2, which is the latest version, but over seven years old. The crate has 21,000 downloads for all time.

[INFO] [stdout] error: expected type, found `..`
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/packed-0.4.2/src/lib.rs:141:31
[INFO] [stdout]     |
[INFO] [stdout] 141 |     unsafe impl Unaligned for .. { }
[INFO] [stdout]     |                               ^^ expected type

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Feb 21, 2024
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Feb 21, 2024

☔ The latest upstream changes (presumably #121400) made this pull request unmergeable. Please resolve the merge conflicts.

The ancient (pre-1.0) RFC 19 suggested using `impl Trait for ..` syntax
for default traits. That was later changed to `auto trait Trait {}`
syntax. The parser has special treatment for the `..` syntax, suggesting
the `auto` syntax.

Given that default traits have not be stabilized and the `..` syntax is
so old, the special case seems unnecessary, and it gets in the way of
adding `ErrorGuaranteed` to `TyKind::Err`. This commit removes it and
the tests.
@nnethercote
Copy link
Contributor Author

The failing line from crossbeam-0.2.9 looks like this:

#[cfg(feature = "nightly")]
unsafe impl ZerosValid for .. {}

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_b8c3be8a-d95f-40ed-b119-99b1fec842ff
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
GITHUB_HEAD_REF=TyKind-Err-guar
GITHUB_JOB=pr
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_b8c3be8a-d95f-40ed-b119-99b1fec842ff
GITHUB_REF=refs/pull/121072/merge
GITHUB_REF_NAME=121072/merge
GITHUB_REF_PROTECTED=false
---

error: expected type, found `..`
##[error]   --> tests/source/type.rs:167:13
    |
167 | impl T for  .. {

error: expected type, found `..`
##[error]   --> tests/target/type.rs:175:12
    |
---

failures:

---- test::system_tests stdout ----
2024-02-21T23:24:13.015763Z  WARN rustfmt_nightly::test: Default value false used explicitly for error_on_line_overflow
2024-02-21T23:24:13.018104Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.018110Z  WARN rustfmt_nightly::test: Default value false used explicitly for error_on_line_overflow
2024-02-21T23:24:13.024671Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.063431Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.082337Z  WARN rustfmt_nightly::test: Default value true used explicitly for reorder_imports
2024-02-21T23:24:13.107253Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
Warning: the `merge_imports` option is deprecated. Use `imports_granularity="Crate"` instead
2024-02-21T23:24:13.127289Z  WARN rustfmt_nightly::test: Default value true used explicitly for reorder_modules
2024-02-21T23:24:13.137379Z  WARN rustfmt_nightly::test: Default value true used explicitly for reorder_imports
2024-02-21T23:24:13.169774Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.185307Z  WARN rustfmt_nightly::test: Default value false used explicitly for wrap_comments
2024-02-21T23:24:13.233115Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.299416Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.317055Z  WARN rustfmt_nightly::test: Default value 2015 used explicitly for edition
2024-02-21T23:24:13.372556Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.404114Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.438102Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.465343Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.485336Z  WARN rustfmt_nightly::test: Default value true used explicitly for merge_derives
2024-02-21T23:24:13.488895Z  WARN rustfmt_nightly::test: Default value true used explicitly for format_macro_bodies
2024-02-21T23:24:13.506135Z  WARN rustfmt_nightly::test: Default value true used explicitly for reorder_imports
2024-02-21T23:24:13.517481Z  WARN rustfmt_nightly::test: Default value false used explicitly for error_on_line_overflow
2024-02-21T23:24:13.517485Z  WARN rustfmt_nightly::test: Default value false used explicitly for format_strings
2024-02-21T23:24:13.518469Z  WARN rustfmt_nightly::test: Default value false used explicitly for error_on_line_overflow
2024-02-21T23:24:13.522691Z  WARN rustfmt_nightly::test: Default value false used explicitly for force_multiline_blocks
2024-02-21T23:24:13.523700Z  WARN rustfmt_nightly::test: Default value true used explicitly for merge_derives
2024-02-21T23:24:13.525844Z  WARN rustfmt_nightly::test: Default value false used explicitly for format_macro_matchers
2024-02-21T23:24:13.526980Z  WARN rustfmt_nightly::test: Default value true used explicitly for format_generated_files
2024-02-21T23:24:13.528583Z  WARN rustfmt_nightly::test: Default value true used explicitly for force_explicit_abi
2024-02-21T23:24:13.532822Z  WARN rustfmt_nightly::test: Default value 50 used explicitly for single_line_let_else_max_width
2024-02-21T23:24:13.534121Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.534974Z  WARN rustfmt_nightly::test: Default value false used explicitly for error_on_line_overflow
2024-02-21T23:24:13.534978Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.535847Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.535853Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.535856Z  WARN rustfmt_nightly::test: Default value false used explicitly for error_on_line_overflow
2024-02-21T23:24:13.537648Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.539979Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.540859Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.541810Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.542640Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.544381Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.549636Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.551413Z  WARN rustfmt_nightly::test: Default value false used explicitly for error_on_line_overflow
2024-02-21T23:24:13.554221Z  WARN rustfmt_nightly::test: Default value Never used explicitly for match_arm_leading_pipes
2024-02-21T23:24:13.556042Z  WARN rustfmt_nightly::test: Default value false used explicitly for use_field_init_shorthand
2024-02-21T23:24:13.557752Z  WARN rustfmt_nightly::test: Default value false used explicitly for hard_tabs
2024-02-21T23:24:13.570668Z  WARN rustfmt_nightly::test: Default value Tall used explicitly for fn_params_layout
2024-02-21T23:24:13.572627Z  WARN rustfmt_nightly::test: Default value false used explicitly for spaces_around_ranges
2024-02-21T23:24:13.574704Z  WARN rustfmt_nightly::test: Default value Wide used explicitly for type_punctuation_density
2024-02-21T23:24:13.575674Z  WARN rustfmt_nightly::test: Default value true used explicitly for reorder_imports
2024-02-21T23:24:13.577356Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.578231Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.578235Z  WARN rustfmt_nightly::test: Default value 4 used explicitly for tab_spaces
2024-02-21T23:24:13.579730Z  WARN rustfmt_nightly::test: Default value false used explicitly for disable_all_formatting
2024-02-21T23:24:13.581444Z  WARN rustfmt_nightly::test: Default value false used explicitly for normalize_comments
2024-02-21T23:24:13.582262Z  WARN rustfmt_nightly::test: Default value 80 used explicitly for comment_width
2024-02-21T23:24:13.583976Z  WARN rustfmt_nightly::test: Default value false used explicitly for wrap_comments
2024-02-21T23:24:13.584847Z  WARN rustfmt_nightly::test: Default value 10 used explicitly for short_array_element_width_threshold
2024-02-21T23:24:13.588169Z  WARN rustfmt_nightly::test: Default value false used explicitly for fn_single_line
2024-02-21T23:24:13.589948Z  WARN rustfmt_nightly::test: Default value true used explicitly for empty_item_single_line
2024-02-21T23:24:13.593469Z  WARN rustfmt_nightly::test: Default value false used explicitly for wrap_comments
2024-02-21T23:24:13.593474Z  WARN rustfmt_nightly::test: Default value false used explicitly for error_on_line_overflow
2024-02-21T23:24:13.594956Z  WARN rustfmt_nightly::test: Default value true used explicitly for reorder_modules
2024-02-21T23:24:13.598752Z  WARN rustfmt_nightly::test: Default value true used explicitly for format_macro_bodies
2024-02-21T23:24:13.601568Z  WARN rustfmt_nightly::test: Default value Vertical used explicitly for trailing_comma
2024-02-21T23:24:13.603458Z  WARN rustfmt_nightly::test: Default value Block used explicitly for imports_indent
2024-02-21T23:24:13.603465Z  WARN rustfmt_nightly::test: Default value Mixed used explicitly for imports_layout
2024-02-21T23:24:13.604278Z  WARN rustfmt_nightly::test: Default value true used explicitly for remove_nested_parens
2024-02-21T23:24:13.605147Z  WARN rustfmt_nightly::test: Default value 100 used explicitly for doc_comment_code_block_width
2024-02-21T23:24:13.606224Z  WARN rustfmt_nightly::test: Default value 100 used explicitly for doc_comment_code_block_width
2024-02-21T23:24:13.613118Z  WARN rustfmt_nightly::test: Default value Default used explicitly for use_small_heuristics
2024-02-21T23:24:13.615832Z  WARN rustfmt_nightly::test: Default value AlwaysSameLine used explicitly for control_brace_style
2024-02-21T23:24:13.616738Z  WARN rustfmt_nightly::test: Default value false used explicitly for error_on_line_overflow
2024-02-21T23:24:13.618391Z  WARN rustfmt_nightly::test: Default value false used explicitly for match_block_trailing_comma
2024-02-21T23:24:13.619232Z  WARN rustfmt_nightly::test: Default value SameLineWhere used explicitly for brace_style
2024-02-21T23:24:13.620933Z  WARN rustfmt_nightly::test: Default value SameLineWhere used explicitly for brace_style
2024-02-21T23:24:13.625205Z  WARN rustfmt_nightly::test: Default value false used explicitly for use_try_shorthand
2024-02-21T23:24:13.627699Z  WARN rustfmt_nightly::test: Default value false used explicitly for condense_wildcard_suffixes
2024-02-21T23:24:13.629380Z  WARN rustfmt_nightly::test: Default value false used explicitly for reorder_impl_items
2024-02-21T23:24:13.630212Z  WARN rustfmt_nightly::test: Default value true used explicitly for match_arm_blocks
2024-02-21T23:24:13.632824Z  WARN rustfmt_nightly::test: Default value false used explicitly for normalize_doc_attributes
2024-02-21T23:24:13.669514Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.700590Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.700594Z  WARN rustfmt_nightly::test: Default value Block used explicitly for imports_indent
2024-02-21T23:24:13.711058Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
Warning: the `fn_args_layout` option is deprecated. Use `fn_params_layout`. instead
2024-02-21T23:24:13.728367Z  WARN rustfmt_nightly::test: Default value [] used explicitly for skip_macro_invocations
thread '<unnamed>' panicked at src/tools/rustfmt/src/test/mod.rs:189:9:
assertion `left == right` failed: 1 system tests failed
  left: 1
 right: 0
 right: 0
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'test::system_tests' panicked at src/tools/rustfmt/src/test/mod.rs:76:10:
Failed to join a test thread: Any { .. }

---- test::idempotence_tests stdout ----
2024-02-21T23:24:13.022146Z  WARN rustfmt_nightly::test: Default value false used explicitly for error_on_line_overflow
error: test failed, to rerun pass `--lib`
Build completed unsuccessfully in 0:01:05
2024-02-21T23:24:13.023784Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.023789Z  WARN rustfmt_nightly::test: Default value false used explicitly for error_on_line_overflow
2024-02-21T23:24:13.031308Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.039085Z  WARN rustfmt_nightly::test: Default value true used explicitly for format_macro_bodies
2024-02-21T23:24:13.046190Z  WARN rustfmt_nightly::test: Default value false used explicitly for wrap_comments
2024-02-21T23:24:13.047000Z  WARN rustfmt_nightly::test: Default value false used explicitly for wrap_comments
2024-02-21T23:24:13.050789Z  WARN rustfmt_nightly::test: Default value false used explicitly for wrap_comments
2024-02-21T23:24:13.053244Z  WARN rustfmt_nightly::test: Default value false used explicitly for wrap_comments
2024-02-21T23:24:13.055455Z  WARN rustfmt_nightly::test: Default value false used explicitly for wrap_comments
2024-02-21T23:24:13.056253Z  WARN rustfmt_nightly::test: Default value false used explicitly for wrap_comments
2024-02-21T23:24:13.060219Z  WARN rustfmt_nightly::test: Default value false used explicitly for wrap_comments
2024-02-21T23:24:13.099117Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.119858Z  WARN rustfmt_nightly::test: Default value true used explicitly for reorder_imports
2024-02-21T23:24:13.135029Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.151821Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
Warning: the `merge_imports` option is deprecated. Use `imports_granularity="Crate"` instead
2024-02-21T23:24:13.178901Z  WARN rustfmt_nightly::test: Default value true used explicitly for reorder_modules
2024-02-21T23:24:13.190583Z  WARN rustfmt_nightly::test: Default value true used explicitly for reorder_imports
2024-02-21T23:24:13.246565Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.263172Z  WARN rustfmt_nightly::test: Default value false used explicitly for wrap_comments
2024-02-21T23:24:13.314552Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.380039Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.402562Z  WARN rustfmt_nightly::test: Default value 2015 used explicitly for edition
2024-02-21T23:24:13.466374Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.502768Z  WARN rustfmt_nightly::test: Default value false used explicitly for wrap_comments
2024-02-21T23:24:13.507860Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.548824Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.582089Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.604965Z  WARN rustfmt_nightly::test: Default value true used explicitly for merge_derives
2024-02-21T23:24:13.608707Z  WARN rustfmt_nightly::test: Default value 0 used explicitly for struct_field_align_threshold
2024-02-21T23:24:13.609601Z  WARN rustfmt_nightly::test: Default value 4 used explicitly for tab_spaces
2024-02-21T23:24:13.609607Z  WARN rustfmt_nightly::test: Default value true used explicitly for reorder_modules
2024-02-21T23:24:13.609609Z  WARN rustfmt_nightly::test: Default value false used explicitly for hard_tabs
2024-02-21T23:24:13.609610Z  WARN rustfmt_nightly::test: Default value 100 used explicitly for max_width
2024-02-21T23:24:13.609615Z  WARN rustfmt_nightly::test: Default value SameLineWhere used explicitly for brace_style
2024-02-21T23:24:13.612324Z  WARN rustfmt_nightly::test: Default value true used explicitly for format_macro_bodies
2024-02-21T23:24:13.633070Z  WARN rustfmt_nightly::test: Default value true used explicitly for reorder_imports
2024-02-21T23:24:13.634894Z  WARN rustfmt_nightly::test: Default value Preserve used explicitly for hex_literal_case
2024-02-21T23:24:13.646806Z  WARN rustfmt_nightly::test: Default value false used explicitly for error_on_line_overflow
2024-02-21T23:24:13.646811Z  WARN rustfmt_nightly::test: Default value false used explicitly for format_strings
2024-02-21T23:24:13.647627Z  WARN rustfmt_nightly::test: Default value Block used explicitly for imports_indent
2024-02-21T23:24:13.648693Z  WARN rustfmt_nightly::test: Default value false used explicitly for error_on_line_overflow
2024-02-21T23:24:13.652179Z  WARN rustfmt_nightly::test: Default value false used explicitly for force_multiline_blocks
2024-02-21T23:24:13.653192Z  WARN rustfmt_nightly::test: Default value true used explicitly for merge_derives
2024-02-21T23:24:13.655275Z  WARN rustfmt_nightly::test: Default value false used explicitly for format_macro_matchers
2024-02-21T23:24:13.656398Z  WARN rustfmt_nightly::test: Default value true used explicitly for format_generated_files
2024-02-21T23:24:13.657995Z  WARN rustfmt_nightly::test: Default value true used explicitly for force_explicit_abi
2024-02-21T23:24:13.662179Z  WARN rustfmt_nightly::test: Default value 50 used explicitly for single_line_let_else_max_width
2024-02-21T23:24:13.663429Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.664284Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.664289Z  WARN rustfmt_nightly::test: Default value false used explicitly for error_on_line_overflow
2024-02-21T23:24:13.665196Z  WARN rustfmt_nightly::test: Default value false used explicitly for error_on_line_overflow
2024-02-21T23:24:13.665200Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.665201Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.666910Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.669024Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.669886Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.670861Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.672176Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.673036Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.674784Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.678360Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.680912Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.682663Z  WARN rustfmt_nightly::test: Default value false used explicitly for error_on_line_overflow
2024-02-21T23:24:13.685377Z  WARN rustfmt_nightly::test: Default value Never used explicitly for match_arm_leading_pipes
2024-02-21T23:24:13.687135Z  WARN rustfmt_nightly::test: Default value false used explicitly for use_field_init_shorthand
2024-02-21T23:24:13.688809Z  WARN rustfmt_nightly::test: Default value false used explicitly for hard_tabs
2024-02-21T23:24:13.701720Z  WARN rustfmt_nightly::test: Default value Tall used explicitly for fn_params_layout
2024-02-21T23:24:13.703611Z  WARN rustfmt_nightly::test: Default value false used explicitly for spaces_around_ranges
2024-02-21T23:24:13.705574Z  WARN rustfmt_nightly::test: Default value Wide used explicitly for type_punctuation_density
2024-02-21T23:24:13.706529Z  WARN rustfmt_nightly::test: Default value true used explicitly for reorder_imports
2024-02-21T23:24:13.708147Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.709042Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.709046Z  WARN rustfmt_nightly::test: Default value 4 used explicitly for tab_spaces
2024-02-21T23:24:13.710541Z  WARN rustfmt_nightly::test: Default value false used explicitly for disable_all_formatting
2024-02-21T23:24:13.712188Z  WARN rustfmt_nightly::test: Default value false used explicitly for normalize_comments
2024-02-21T23:24:13.713048Z  WARN rustfmt_nightly::test: Default value 80 used explicitly for comment_width
2024-02-21T23:24:13.714629Z  WARN rustfmt_nightly::test: Default value false used explicitly for wrap_comments
2024-02-21T23:24:13.715408Z  WARN rustfmt_nightly::test: Default value 10 used explicitly for short_array_element_width_threshold
2024-02-21T23:24:13.718720Z  WARN rustfmt_nightly::test: Default value false used explicitly for fn_single_line
2024-02-21T23:24:13.720471Z  WARN rustfmt_nightly::test: Default value SameLineWhere used explicitly for brace_style
2024-02-21T23:24:13.721327Z  WARN rustfmt_nightly::test: Default value true used explicitly for empty_item_single_line
2024-02-21T23:24:13.722928Z  WARN rustfmt_nightly::test: Default value false used explicitly for error_on_unformatted
2024-02-21T23:24:13.725546Z  WARN rustfmt_nightly::test: Default value false used explicitly for error_on_line_overflow
2024-02-21T23:24:13.725550Z  WARN rustfmt_nightly::test: Default value false used explicitly for wrap_comments
2024-02-21T23:24:13.727021Z  WARN rustfmt_nightly::test: Default value true used explicitly for reorder_modules
2024-02-21T23:24:13.730848Z  WARN rustfmt_nightly::test: Default value true used explicitly for trailing_semicolon
2024-02-21T23:24:13.732710Z  WARN rustfmt_nightly::test: Default value true used explicitly for format_macro_bodies
2024-02-21T23:24:13.735449Z  WARN rustfmt_nightly::test: Default value Vertical used explicitly for trailing_comma
2024-02-21T23:24:13.737311Z  WARN rustfmt_nightly::test: Default value Block used explicitly for imports_indent
2024-02-21T23:24:13.737315Z  WARN rustfmt_nightly::test: Default value Mixed used explicitly for imports_layout
2024-02-21T23:24:13.738174Z  WARN rustfmt_nightly::test: Default value Block used explicitly for imports_indent
2024-02-21T23:24:13.739100Z  WARN rustfmt_nightly::test: Default value Block used explicitly for imports_indent
2024-02-21T23:24:13.739104Z  WARN rustfmt_nightly::test: Default value Mixed used explicitly for imports_layout
2024-02-21T23:24:13.739955Z  WARN rustfmt_nightly::test: Default value true used explicitly for remove_nested_parens
2024-02-21T23:24:13.740811Z  WARN rustfmt_nightly::test: Default value 100 used explicitly for doc_comment_code_block_width
2024-02-21T23:24:13.741880Z  WARN rustfmt_nightly::test: Default value 100 used explicitly for doc_comment_code_block_width
2024-02-21T23:24:13.748719Z  WARN rustfmt_nightly::test: Default value Default used explicitly for use_small_heuristics
2024-02-21T23:24:13.751452Z  WARN rustfmt_nightly::test: Default value AlwaysSameLine used explicitly for control_brace_style
2024-02-21T23:24:13.752303Z  WARN rustfmt_nightly::test: Default value false used explicitly for error_on_line_overflow
2024-02-21T23:24:13.753972Z  WARN rustfmt_nightly::test: Default value false used explicitly for match_block_trailing_comma
2024-02-21T23:24:13.754817Z  WARN rustfmt_nightly::test: Default value SameLineWhere used explicitly for brace_style
2024-02-21T23:24:13.756540Z  WARN rustfmt_nightly::test: Default value SameLineWhere used explicitly for brace_style
2024-02-21T23:24:13.760807Z  WARN rustfmt_nightly::test: Default value false used explicitly for use_try_shorthand
2024-02-21T23:24:13.763291Z  WARN rustfmt_nightly::test: Default value false used explicitly for condense_wildcard_suffixes
2024-02-21T23:24:13.764148Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.764152Z  WARN rustfmt_nightly::test: Default value true used explicitly for combine_control_expr
2024-02-21T23:24:13.765458Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.767538Z  WARN rustfmt_nightly::test: Default value false used explicitly for reorder_impl_items
2024-02-21T23:24:13.768369Z  WARN rustfmt_nightly::test: Default value true used explicitly for match_arm_blocks
2024-02-21T23:24:13.770931Z  WARN rustfmt_nightly::test: Default value false used explicitly for normalize_doc_attributes
2024-02-21T23:24:13.800375Z  WARN rustfmt_nightly::test: Default value false used explicitly for format_macro_matchers
2024-02-21T23:24:13.820082Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.857480Z  WARN rustfmt_nightly::test: Default value Block used explicitly for indent_style
2024-02-21T23:24:13.857484Z  WARN rustfmt_nightly::test: Default value Block used explicitly for imports_indent
2024-02-21T23:24:13.863327Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
2024-02-21T23:24:13.872709Z  WARN rustfmt_nightly::test: Default value One used explicitly for version
Warning: the `fn_args_layout` option is deprecated. Use `fn_params_layout`. instead
2024-02-21T23:24:13.893512Z  WARN rustfmt_nightly::test: Default value [] used explicitly for skip_macro_invocations
thread '<unnamed>' panicked at src/tools/rustfmt/src/test/mod.rs:369:9:
assertion `left == right` failed: 1 idempotent tests failed
  left: 1
 right: 0

@nnethercote
Copy link
Contributor Author

After some discussion with @tmandry I have decided that removing this is more trouble than it is worth, given that it's a pretty tiny chunk of code in the compiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants