Skip to content

Conversation

camelid
Copy link
Member

@camelid camelid commented Oct 13, 2025

  • Remove parent def lookup hack that is no longer needed
  • Fix lowering of CStr constants to valtrees

The tcx.parent tree appears to be correct now.
@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 Oct 13, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 13, 2025

r? @lcnr

rustbot has assigned @lcnr.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rust-log-analyzer

This comment has been minimized.

@lcnr
Copy link
Contributor

lcnr commented Oct 14, 2025

r? @BoxyUwU lgtm, but not totally sure about the first change and don't want to look into this

@rustbot rustbot assigned BoxyUwU and unassigned lcnr Oct 14, 2025
They need an extra branch for the newtype.
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-20-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test [crashes] tests/crashes/127033.rs ... ok
test [crashes] tests/crashes/127643.rs ... ok
test [crashes] tests/crashes/127972.rs ... ok
test [crashes] tests/crashes/125323.rs ... ok
2025-10-16T11:27:48.699172Z ERROR compiletest::runtest: fatal error, panic: "crashtest no longer crashes/triggers ICE, hooray! Please give it a meaningful name, add a doc-comment to the start of the test explaining why it exists and move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR description ensures that the corresponding ticket is auto-closed upon merge. If you want to see verbose output, set `COMPILETEST_VERBOSE_CRASHES=1`."
test [crashes] tests/crashes/129209.rs ... FAILED
test [crashes] tests/crashes/129425.rs ... ok
test [crashes] tests/crashes/129556.rs ... ok
test [crashes] tests/crashes/130346.rs ... ok
test [crashes] tests/crashes/130395.rs ... ok
---
test [crashes] tests/crashes/130797.rs ... ok
test [crashes] tests/crashes/131046.rs ... ok
test [crashes] tests/crashes/131052.rs ... ok
test [crashes] tests/crashes/131292.rs ... ok
2025-10-16T11:27:49.173425Z ERROR compiletest::runtest: fatal error, panic: "crashtest no longer crashes/triggers ICE, hooray! Please give it a meaningful name, add a doc-comment to the start of the test explaining why it exists and move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR description ensures that the corresponding ticket is auto-closed upon merge. If you want to see verbose output, set `COMPILETEST_VERBOSE_CRASHES=1`."
test [crashes] tests/crashes/131295.rs ... FAILED
test [crashes] tests/crashes/131534.rs ... ok
test [crashes] tests/crashes/131373.rs ... ok
test [crashes] tests/crashes/131406.rs ... ok
test [crashes] tests/crashes/131787.rs ... ok
---
test [crashes] tests/crashes/139381.rs ... ok
test [crashes] tests/crashes/139387.rs ... ok
test [crashes] tests/crashes/139570.rs ... ok
test [crashes] tests/crashes/139462.rs ... ok
2025-10-16T11:27:51.507506Z ERROR compiletest::runtest: fatal error, panic: "crashtest no longer crashes/triggers ICE, hooray! Please give it a meaningful name, add a doc-comment to the start of the test explaining why it exists and move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR description ensures that the corresponding ticket is auto-closed upon merge. If you want to see verbose output, set `COMPILETEST_VERBOSE_CRASHES=1`."
test [crashes] tests/crashes/139738.rs ... FAILED
test [crashes] tests/crashes/139596.rs ... ok
test [crashes] tests/crashes/139815.rs ... ok
test [crashes] tests/crashes/138361.rs ... ok
test [crashes] tests/crashes/140123-2.rs ... ok
---

---- [crashes] tests/crashes/129209.rs stdout ----
------rustc stdout------------------------------

------rustc stderr------------------------------
error[E0412]: cannot find type `True` in this scope
##[error] --> /checkout/tests/crashes/129209.rs:9:21
  |
9 |     > PartialEq for True
  |                     ^^^^ not found in this scope
---
error[E0425]: cannot find value `X` in this scope
##[error] --> /checkout/tests/crashes/129209.rs:6:25
  |
4 |         const N: usize = {
  |               - similarly named const parameter `N` defined here
5 |             static || {
6 |                 Foo([0; X]);
  |                         ^ help: a const parameter with a similar name exists: `N`

error[E0658]: coroutine syntax is experimental
##[error] --> /checkout/tests/crashes/129209.rs:5:13
  |
5 |             static || {
---
error: defaults for generic parameters are not allowed here
##[error] --> /checkout/tests/crashes/129209.rs:4:9
  |
4 | /         const N: usize = {
5 | |             static || {
6 | |                 Foo([0; X]);
7 | |             }
8 | |         },
  | |_________^

error[E0425]: cannot find function, tuple struct or tuple variant `Foo` in this scope
##[error] --> /checkout/tests/crashes/129209.rs:6:17
  |
6 |                 Foo([0; X]);
  |                 ^^^ not found in this scope

error[E0308]: mismatched types
##[error] --> /checkout/tests/crashes/129209.rs:5:13
  |
5 | /             static || {
6 | |                 Foo([0; X]);
7 | |             }
  | |_____________^ expected `usize`, found closure
  |
  = note: expected type `usize`
          found closure `{closure@/checkout/tests/crashes/129209.rs:5:13: 5:22}`

error: aborting due to 8 previous errors

Some errors have detailed explanations: E0308, E0412, E0425, E0601, E0658, E0697.
For more information about an error, try `rustc --explain E0308`.

------------------------------------------

error: crashtest no longer crashes/triggers ICE, hooray! Please give it a meaningful name, add a doc-comment to the start of the test explaining why it exists and move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR description ensures that the corresponding ticket is auto-closed upon merge. If you want to see verbose output, set `COMPILETEST_VERBOSE_CRASHES=1`.

thread '[crashes] tests/crashes/129209.rs' panicked at src/tools/compiletest/src/runtest/crashes.rs:17:18:
fatal error
stack backtrace:
   5: __rustc::rust_begin_unwind
---
---- [crashes] tests/crashes/129209.rs stdout end ----
---- [crashes] tests/crashes/131295.rs stdout ----
------rustc stdout------------------------------

------rustc stderr------------------------------
error[E0670]: `async fn` is not permitted in Rust 2015
##[error] --> /checkout/tests/crashes/131295.rs:5:1
  |
5 | async fn foo<'a>() -> [(); {
  | ^^^^^ to use `async fn`, switch to Rust 2018 or later
  |
  = help: pass `--edition 2024` to `rustc`
  = note: for more on editions, read https://doc.rust-lang.org/edition-guide

warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
---
  |
8 |      }] {
  |  _______^
9 | | }
  | |_^ expected `[(); {
       let _y: &'a ();
       4
   }]`, found `()`

error: aborting due to 3 previous errors; 1 warning emitted

Some errors have detailed explanations: E0308, E0601, E0670.
For more information about an error, try `rustc --explain E0308`.

------------------------------------------

error: crashtest no longer crashes/triggers ICE, hooray! Please give it a meaningful name, add a doc-comment to the start of the test explaining why it exists and move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR description ensures that the corresponding ticket is auto-closed upon merge. If you want to see verbose output, set `COMPILETEST_VERBOSE_CRASHES=1`.

thread '[crashes] tests/crashes/131295.rs' panicked at src/tools/compiletest/src/runtest/crashes.rs:17:18:
fatal error
stack backtrace:
   5: __rustc::rust_begin_unwind
---
---- [crashes] tests/crashes/131295.rs stdout end ----
---- [crashes] tests/crashes/139738.rs stdout ----
------rustc stdout------------------------------

------rustc stderr------------------------------
warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
##[warning] --> /checkout/tests/crashes/139738.rs:2:12
  |
2 | #![feature(generic_const_exprs)]
  |            ^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
  = note: `#[warn(incomplete_features)]` on by default

error[E0601]: `main` function not found in crate `139738`
##[error] --> /checkout/tests/crashes/139738.rs:3:63
  |
3 | fn b<'a>() -> impl IntoIterator<[(); (|_: &'a u8| 0, 0).1]> {}
  |                                                               ^ consider adding a `main` function to `/checkout/tests/crashes/139738.rs`

error[E0581]: return type references lifetime `'a`, which is not constrained by the fn input types
##[error] --> /checkout/tests/crashes/139738.rs:3:15
  |
3 | fn b<'a>() -> impl IntoIterator<[(); (|_: &'a u8| 0, 0).1]> {}
  |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
##[error] --> /checkout/tests/crashes/139738.rs:3:20
  |
3 | fn b<'a>() -> impl IntoIterator<[(); (|_: &'a u8| 0, 0).1]> {}
  |                    ^^^^^^^^^^^^---------------------------- help: remove the unnecessary generics
  |                    |
  |                    expected 0 generic arguments

error[E0277]: `()` is not an iterator
##[error] --> /checkout/tests/crashes/139738.rs:3:15
  |
3 | fn b<'a>() -> impl IntoIterator<[(); (|_: &'a u8| 0, 0).1]> {}
  |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `()` is not an iterator
  |
  = help: the trait `Iterator` is not implemented for `()`
  = note: required for `()` to implement `IntoIterator`

error: aborting due to 4 previous errors; 1 warning emitted

Some errors have detailed explanations: E0107, E0277, E0581, E0601.
For more information about an error, try `rustc --explain E0107`.

------------------------------------------

error: crashtest no longer crashes/triggers ICE, hooray! Please give it a meaningful name, add a doc-comment to the start of the test explaining why it exists and move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR description ensures that the corresponding ticket is auto-closed upon merge. If you want to see verbose output, set `COMPILETEST_VERBOSE_CRASHES=1`.

thread '[crashes] tests/crashes/139738.rs' panicked at src/tools/compiletest/src/runtest/crashes.rs:17:18:
fatal error
stack backtrace:
   5: __rustc::rust_begin_unwind

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants