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

Rollup of 7 pull requests #127529

Closed
wants to merge 22 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Sky9x and others added 22 commits July 4, 2024 23:55
…dtolnay

impl FusedIterator and a size hint for the error sources iter

cc tracking issue rust-lang#58520
Automatically taint when reporting errors from ItemCtxt

This isn't very robust yet, as you need to use `itemctxt.dcx()` instead of `tcx.dcx()` for it to take effect, but it's at least more convenient than sprinkling `set_tainted_by_errors` calls in individual places.

based on rust-lang#127357

r? ```@fmease```
Use verbose style when suggesting changing `const` with `let`
…e-doc, r=fmease

`#[doc(alias)]`'s doc: say that ASCII spaces are allowed

PR rust-lang#77570 allowed ASCII spaces in doc aliases, but the documentation wasn't updated to say so.

The code checking the aliases:
https://github.com/rust-lang/rust/blob/7fdefb804ec300fb605039522a7c0dfc9e7dc366/compiler/rustc_passes/src/check_attr.rs#L693-L704

```@rustbot``` label +A-docs
…eworking, r=lcnr

More trait error reworking

More work on rust-lang#127492, specifically those sub-bullets under "Move trait error reporting to `error_reporting::traits`". Stacked on top of rust-lang#127493.

This does introduce new `TypeErrCtxt.*Ext` traits, but those will be deleted soon. Splitting this work into bite-sized pieces is the only way that it's gonna be feasible to both author and review ❤️

r? lcnr
…=Nadrieril

Update `f16`/`f128` FIXMEs that needed `(NEG_)INFINITY`

Just a small fix to the pattern matching tests now that we can. Also contains a small unrelated comment tweak.
…-errors

small search graph refactor

small improvements which shouldn't impact behavior.

r? ```@compiler-errors```
@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. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative rollup A PR which is a rollup labels Jul 9, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=7

@bors
Copy link
Contributor

bors commented Jul 9, 2024

📌 Commit 0cda246 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 9, 2024
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 9, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 9, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#127091 (impl FusedIterator and a size hint for the error sources iter)
 - rust-lang#127358 (Automatically taint when reporting errors from ItemCtxt)
 - rust-lang#127382 (Use verbose style when suggesting changing `const` with `let`)
 - rust-lang#127484 (`#[doc(alias)]`'s doc: say that ASCII spaces are allowed)
 - rust-lang#127495 (More trait error reworking)
 - rust-lang#127496 (Update `f16`/`f128` FIXMEs that needed `(NEG_)INFINITY`)
 - rust-lang#127508 (small search graph refactor)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Contributor

bors commented Jul 9, 2024

⌛ Testing commit 0cda246 with merge 978e1ae...

@rust-log-analyzer
Copy link
Collaborator

The job aarch64-apple failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

---- [ui] tests/ui/asm/aarch64/parse-error.rs stdout ----
diff of stderr:

398 LL |     const bar: /* Type */ = 0;
400 
- 
402 error: aborting due to 57 previous errors
403 
---
To only update this specific test, also pass `--test-args asm/aarch64/parse-error.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/bin/rustc" "/Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/.cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/work/rust/rust/vendor" "--sysroot" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2" "--target=aarch64-apple-darwin" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/asm/aarch64/parse-error" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/Users/runner/work/rust/rust/build/aarch64-apple-darwin/native/rust-test-helpers" "-L" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/asm/aarch64/parse-error/auxiliary"
--- stderr -------------------------------
error: requires at least a template string argument
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:11:9
   |
---

error: expected `)`, found `foo`
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:21:27
   |
LL |         asm!("{}", in(reg foo));
   |                           ^^^ expected `)`
error: expected expression, found end of macro arguments
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:23:27
   |
   |
LL |         asm!("{}", in(reg));

error: expected register class or explicit register
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:25:26
   |
   |
LL |         asm!("{}", inout(=) foo => bar);

error: expected expression, found end of macro arguments
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:27:37
   |
   |
LL |         asm!("{}", inout(reg) foo =>);


error: expected one of `!`, `,`, `.`, `::`, `?`, `{`, or an operator, found `=>`
   |
   |
LL |         asm!("{}", in(reg) foo => bar);

error: expected a path for argument to `sym`
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:31:24
   |
   |
LL |         asm!("{}", sym foo + bar);


error: expected one of `)`, `att_syntax`, `may_unwind`, `nomem`, `noreturn`, `nostack`, `preserves_flags`, `pure`, `raw`, or `readonly`, found `foo`
   |
   |
LL |         asm!("", options(foo));


error: expected one of `)` or `,`, found `foo`
   |
   |
LL |         asm!("", options(nomem foo));
   |                                ^^^ expected one of `)` or `,`

error: expected one of `)`, `att_syntax`, `may_unwind`, `nomem`, `noreturn`, `nostack`, `preserves_flags`, `pure`, `raw`, or `readonly`, found `foo`
   |
   |
LL |         asm!("", options(nomem, foo));

error: expected string literal
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:41:30
   |
   |
LL |         asm!("", clobber_abi(foo));


error: expected one of `)` or `,`, found `foo`
   |
   |
LL |         asm!("", clobber_abi("C" foo));
   |                                  ^^^ expected one of `)` or `,`
error: expected string literal
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:45:35
   |
   |
LL |         asm!("", clobber_abi("C", foo));

error: duplicate argument named `a`
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:52:36
   |
   |
LL |         asm!("{a}", a = const foo, a = const bar);
   |                     -------------  ^^^^^^^^^^^^^ duplicate argument
   |                     previously here

error: argument never used
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:52:36
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:52:36
   |
LL |         asm!("{a}", a = const foo, a = const bar);
   |                                    ^^^^^^^^^^^^^ argument never used
   |
   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"`
error: explicit register arguments cannot have names
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:57:18
   |
   |
LL |         asm!("", a = in("x0") foo);

error: positional arguments cannot follow named arguments or explicit register arguments
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:63:35
   |
   |
LL |         asm!("{1}", in("x0") foo, const bar);
   |                     ------------  ^^^^^^^^^ positional argument
   |                     explicit register argument


error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `""`
   |
   |
LL |         asm!("", options(), "");


error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `"{}"`
   |
   |
LL |         asm!("{}", in(reg) foo, "{}", out(reg) foo);

error: asm template must be a string literal
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:70:14
   |
   |
LL |         asm!(format!("{{{}}}", 0), in(reg) foo);
   |
   = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)

error: asm template must be a string literal
error: asm template must be a string literal
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:72:21
   |
LL |         asm!("{1}", format!("{{{}}}", 0), in(reg) foo, out(reg) bar);
   |
   = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)


error: _ cannot be used for input operands
   |
   |
LL |         asm!("{}", in(reg) _);


error: _ cannot be used for input operands
   |
   |
LL |         asm!("{}", inout(reg) _);


error: _ cannot be used for input operands
   |
   |
LL |         asm!("{}", inlateout(reg) _);

error: requires at least a template string argument
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:85:1
   |
   |
LL | global_asm!();

error: asm template must be a string literal
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:87:13
   |
   |
LL | global_asm!(FOO);

error: expected token: `,`
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:89:18
   |
   |
LL | global_asm!("{}" FOO);
   |                  ^^^ expected `,`
error: expected operand, options, or additional template string
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:91:19
   |
   |
LL | global_asm!("{}", FOO);
   |                   ^^^ expected operand, options, or additional template string
error: expected expression, found end of macro arguments
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:93:24
   |
   |
LL | global_asm!("{}", const);


error: expected one of `,`, `.`, `?`, or an operator, found `FOO`
   |
   |
LL | global_asm!("{}", const(reg) FOO);
   |                              ^^^ expected one of `,`, `.`, `?`, or an operator

error: expected one of `)`, `att_syntax`, or `raw`, found `FOO`
   |
   |
LL | global_asm!("", options(FOO));
   |                         ^^^ expected one of `)`, `att_syntax`, or `raw`

error: expected one of `)`, `att_syntax`, or `raw`, found `nomem`
   |
   |
LL | global_asm!("", options(nomem FOO));
   |                         ^^^^^ expected one of `)`, `att_syntax`, or `raw`

error: expected one of `)`, `att_syntax`, or `raw`, found `nomem`
   |
   |
LL | global_asm!("", options(nomem, FOO));
   |                         ^^^^^ expected one of `)`, `att_syntax`, or `raw`
error: expected string literal
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:104:29
   |
   |
LL | global_asm!("", clobber_abi(FOO));


error: expected one of `)` or `,`, found `FOO`
   |
   |
LL | global_asm!("", clobber_abi("C" FOO));
   |                                 ^^^ expected one of `)` or `,`
error: expected string literal
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:108:34
   |
   |
LL | global_asm!("", clobber_abi("C", FOO));


error: `clobber_abi` cannot be used with `global_asm!`
   |
   |
LL | global_asm!("{}", clobber_abi("C"), const FOO);


error: `clobber_abi` cannot be used with `global_asm!`
   |
   |
LL | global_asm!("", options(), clobber_abi("C"));


error: `clobber_abi` cannot be used with `global_asm!`
   |
   |
LL | global_asm!("{}", options(), clobber_abi("C"), const FOO);

error: duplicate argument named `a`
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:116:35
   |
   |
LL | global_asm!("{a}", a = const FOO, a = const BAR);
   |                    -------------  ^^^^^^^^^^^^^ duplicate argument
   |                    previously here

error: argument never used
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:116:35
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:116:35
   |
LL | global_asm!("{a}", a = const FOO, a = const BAR);
   |                                   ^^^^^^^^^^^^^ argument never used
   |
   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"`

error: expected one of `clobber_abi`, `const`, `options`, or `sym`, found `""`
   |
   |
LL | global_asm!("", options(), "");
   |                            ^^ expected one of `clobber_abi`, `const`, `options`, or `sym`

error: expected one of `clobber_abi`, `const`, `options`, or `sym`, found `"{}"`
   |
   |
LL | global_asm!("{}", const FOO, "{}", const FOO);
   |                              ^^^^ expected one of `clobber_abi`, `const`, `options`, or `sym`
error: asm template must be a string literal
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:123:13
   |
   |
LL | global_asm!(format!("{{{}}}", 0), const FOO);
   |
   = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)

error: asm template must be a string literal
error: asm template must be a string literal
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:125:20
   |
LL | global_asm!("{1}", format!("{{{}}}", 0), const FOO, const BAR);
   |
   = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0435]: attempt to use a non-constant value in a constant
error[E0435]: attempt to use a non-constant value in a constant
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:39:37
   |
LL |         asm!("{}", options(), const foo);
   |                                     ^^^ non-constant value
   |
help: consider using `const` instead of `let`
   |
LL |     const foo: /* Type */ = 0;

error[E0435]: attempt to use a non-constant value in a constant
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:47:44
   |
   |
LL |         asm!("{}", clobber_abi("C"), const foo);
   |                                            ^^^ non-constant value
help: consider using `const` instead of `let`
   |
   |
LL |     const foo: /* Type */ = 0;

error[E0435]: attempt to use a non-constant value in a constant
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:50:55
   |
   |
LL |         asm!("{}", options(), clobber_abi("C"), const foo);
   |                                                       ^^^ non-constant value
help: consider using `const` instead of `let`
   |
   |
LL |     const foo: /* Type */ = 0;

error[E0435]: attempt to use a non-constant value in a constant
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:52:31
   |
   |
LL |         asm!("{a}", a = const foo, a = const bar);
   |                               ^^^ non-constant value
help: consider using `const` instead of `let`
   |
   |
LL |     const foo: /* Type */ = 0;

error[E0435]: attempt to use a non-constant value in a constant
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:52:46
   |
   |
LL |         asm!("{a}", a = const foo, a = const bar);
   |                                              ^^^ non-constant value
help: consider using `const` instead of `let`
   |
   |
LL |     const bar: /* Type */ = 0;

error[E0435]: attempt to use a non-constant value in a constant
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:59:45
   |
   |
LL |         asm!("{a}", in("x0") foo, a = const bar);
   |                                             ^^^ non-constant value
help: consider using `const` instead of `let`
   |
   |
LL |     const bar: /* Type */ = 0;

error[E0435]: attempt to use a non-constant value in a constant
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:61:45
   |
   |
LL |         asm!("{a}", in("x0") foo, a = const bar);
   |                                             ^^^ non-constant value
help: consider using `const` instead of `let`
   |
   |
LL |     const bar: /* Type */ = 0;

error[E0435]: attempt to use a non-constant value in a constant
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:63:41
   |
   |
LL |         asm!("{1}", in("x0") foo, const bar);
   |                                         ^^^ non-constant value
help: consider using `const` instead of `let`
   |
   |
LL |     const bar: /* Type */ = 0;

error: aborting due to 57 previous errors

For more information about this error, try `rustc --explain E0435`.

@bors
Copy link
Contributor

bors commented Jul 9, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 9, 2024
@matthiaskrgr matthiaskrgr deleted the rollup-rsmyi5j branch September 1, 2024 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup 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. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects
None yet
Development

Successfully merging this pull request may close these issues.