Skip to content

Conversation

@Enselic
Copy link
Member

@Enselic Enselic commented Dec 17, 2025

Closes #71259 which just E-needs-test. See #71259 (comment) for a good description of what we should test (which we do in this PR).

The project we add fails with an old nightly without the fix:

$ cargo +nightly-2020-03-10 run
   Compiling consumer v0.1.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/consumer)
    Finished dev [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/consumer`
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `"version 1"`,
 right: `"version 2"`', src/main.rs:6:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

and passes with a recent toolchain:

$ cargo run
warning: /home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/consumer/Cargo.toml: no edition set: defaulting to the 2015 edition while the latest is 2024
warning: /home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v1/Cargo.toml: no edition set: defaulting to the 2015 edition while the latest is 2024
warning: /home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v2/Cargo.toml: no edition set: defaulting to the 2015 edition while the latest is 2024
   Compiling mylib v2.0.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v2)
   Compiling mylib v1.0.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v1)
   Compiling consumer v0.1.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/consumer)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/consumer`

in other words, the test tests what it should and will catch regressions.

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs 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 Dec 17, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 17, 2025

r? @jieyouxu

rustbot has assigned @jieyouxu.
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

@Kivooeo
Copy link
Member

Kivooeo commented Dec 17, 2025

r? me

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Dec 17, 2025

📌 Commit 60b616d has been approved by Kivooeo

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 17, 2025
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Dec 18, 2025
…ivooeo

tests/run-make-cargo/same-crate-name-and-macro-name: New regression test

Closes rust-lang#71259 which just **E-needs-test**. See rust-lang#71259 (comment) for a good description of what we should test (which we do in this PR).

The project we add fails with an old nightly without the fix:

```console
$ cargo +nightly-2020-03-10 run
   Compiling consumer v0.1.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/consumer)
    Finished dev [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/consumer`
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `"version 1"`,
 right: `"version 2"`', src/main.rs:6:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

and passes with a recent toolchain:

```console
$ cargo run
warning: /home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/consumer/Cargo.toml: no edition set: defaulting to the 2015 edition while the latest is 2024
warning: /home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v1/Cargo.toml: no edition set: defaulting to the 2015 edition while the latest is 2024
warning: /home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v2/Cargo.toml: no edition set: defaulting to the 2015 edition while the latest is 2024
   Compiling mylib v2.0.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v2)
   Compiling mylib v1.0.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v1)
   Compiling consumer v0.1.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/consumer)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/consumer`
```

in other words, the test tests what it should and will catch regressions.
Zalathar added a commit to Zalathar/rust that referenced this pull request Dec 18, 2025
…ivooeo

tests/run-make-cargo/same-crate-name-and-macro-name: New regression test

Closes rust-lang#71259 which just **E-needs-test**. See rust-lang#71259 (comment) for a good description of what we should test (which we do in this PR).

The project we add fails with an old nightly without the fix:

```console
$ cargo +nightly-2020-03-10 run
   Compiling consumer v0.1.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/consumer)
    Finished dev [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/consumer`
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `"version 1"`,
 right: `"version 2"`', src/main.rs:6:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

and passes with a recent toolchain:

```console
$ cargo run
warning: /home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/consumer/Cargo.toml: no edition set: defaulting to the 2015 edition while the latest is 2024
warning: /home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v1/Cargo.toml: no edition set: defaulting to the 2015 edition while the latest is 2024
warning: /home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v2/Cargo.toml: no edition set: defaulting to the 2015 edition while the latest is 2024
   Compiling mylib v2.0.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v2)
   Compiling mylib v1.0.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v1)
   Compiling consumer v0.1.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/consumer)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/consumer`
```

in other words, the test tests what it should and will catch regressions.
bors added a commit that referenced this pull request Dec 18, 2025
…uwer

Rollup of 5 pull requests

Successful merges:

 - #145933 (Expand `str_as_str` to more types)
 - #148849 (Set -Cpanic=abort in windows-msvc stack protector tests)
 - #150048 (std_detect: AArch64 Darwin: expose SME F16F16 and B16B16 features)
 - #150083 (tests/run-make-cargo/same-crate-name-and-macro-name: New regression test)
 - #150102 (Fixed ICE for EII with multiple defaults due to duplicate definition in nameres)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Dec 18, 2025
…uwer

Rollup of 5 pull requests

Successful merges:

 - #145933 (Expand `str_as_str` to more types)
 - #148849 (Set -Cpanic=abort in windows-msvc stack protector tests)
 - #150048 (std_detect: AArch64 Darwin: expose SME F16F16 and B16B16 features)
 - #150083 (tests/run-make-cargo/same-crate-name-and-macro-name: New regression test)
 - #150102 (Fixed ICE for EII with multiple defaults due to duplicate definition in nameres)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Dec 18, 2025
tests/run-make-cargo/same-crate-name-and-macro-name: New regression test

Closes #71259 which just **E-needs-test**. See #71259 (comment) for a good description of what we should test (which we do in this PR).

The project we add fails with an old nightly without the fix:

```console
$ cargo +nightly-2020-03-10 run
   Compiling consumer v0.1.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/consumer)
    Finished dev [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/consumer`
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `"version 1"`,
 right: `"version 2"`', src/main.rs:6:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

and passes with a recent toolchain:

```console
$ cargo run
warning: /home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/consumer/Cargo.toml: no edition set: defaulting to the 2015 edition while the latest is 2024
warning: /home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v1/Cargo.toml: no edition set: defaulting to the 2015 edition while the latest is 2024
warning: /home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v2/Cargo.toml: no edition set: defaulting to the 2015 edition while the latest is 2024
   Compiling mylib v2.0.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v2)
   Compiling mylib v1.0.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v1)
   Compiling consumer v0.1.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/consumer)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/consumer`
```

in other words, the test tests what it should and will catch regressions.
@bors
Copy link
Collaborator

bors commented Dec 18, 2025

⌛ Testing commit 60b616d with merge 15e821a...

@bors
Copy link
Collaborator

bors commented Dec 18, 2025

💔 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 Dec 18, 2025
bors added a commit that referenced this pull request Dec 18, 2025
…uwer

Rollup of 5 pull requests

Successful merges:

 - #145933 (Expand `str_as_str` to more types)
 - #148849 (Set -Cpanic=abort in windows-msvc stack protector tests)
 - #150048 (std_detect: AArch64 Darwin: expose SME F16F16 and B16B16 features)
 - #150083 (tests/run-make-cargo/same-crate-name-and-macro-name: New regression test)
 - #150102 (Fixed ICE for EII with multiple defaults due to duplicate definition in nameres)

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

@bors retry (Spurious)

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 18, 2025
bors added a commit that referenced this pull request Dec 18, 2025
…uwer

Rollup of 5 pull requests

Successful merges:

 - #145933 (Expand `str_as_str` to more types)
 - #148849 (Set -Cpanic=abort in windows-msvc stack protector tests)
 - #150048 (std_detect: AArch64 Darwin: expose SME F16F16 and B16B16 features)
 - #150083 (tests/run-make-cargo/same-crate-name-and-macro-name: New regression test)
 - #150102 (Fixed ICE for EII with multiple defaults due to duplicate definition in nameres)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

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

bors added a commit that referenced this pull request Dec 18, 2025
…uwer

Rollup of 5 pull requests

Successful merges:

 - #145933 (Expand `str_as_str` to more types)
 - #148849 (Set -Cpanic=abort in windows-msvc stack protector tests)
 - #150048 (std_detect: AArch64 Darwin: expose SME F16F16 and B16B16 features)
 - #150083 (tests/run-make-cargo/same-crate-name-and-macro-name: New regression test)
 - #150102 (Fixed ICE for EII with multiple defaults due to duplicate definition in nameres)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Dec 18, 2025
…uwer

Rollup of 5 pull requests

Successful merges:

 - #145933 (Expand `str_as_str` to more types)
 - #148849 (Set -Cpanic=abort in windows-msvc stack protector tests)
 - #150048 (std_detect: AArch64 Darwin: expose SME F16F16 and B16B16 features)
 - #150083 (tests/run-make-cargo/same-crate-name-and-macro-name: New regression test)
 - #150102 (Fixed ICE for EII with multiple defaults due to duplicate definition in nameres)

r? `@ghost`
`@rustbot` modify labels: rollup
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Dec 18, 2025
…ivooeo

tests/run-make-cargo/same-crate-name-and-macro-name: New regression test

Closes rust-lang#71259 which just **E-needs-test**. See rust-lang#71259 (comment) for a good description of what we should test (which we do in this PR).

The project we add fails with an old nightly without the fix:

```console
$ cargo +nightly-2020-03-10 run
   Compiling consumer v0.1.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/consumer)
    Finished dev [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/consumer`
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `"version 1"`,
 right: `"version 2"`', src/main.rs:6:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

and passes with a recent toolchain:

```console
$ cargo run
warning: /home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/consumer/Cargo.toml: no edition set: defaulting to the 2015 edition while the latest is 2024
warning: /home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v1/Cargo.toml: no edition set: defaulting to the 2015 edition while the latest is 2024
warning: /home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v2/Cargo.toml: no edition set: defaulting to the 2015 edition while the latest is 2024
   Compiling mylib v2.0.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v2)
   Compiling mylib v1.0.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v1)
   Compiling consumer v0.1.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/consumer)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/consumer`
```

in other words, the test tests what it should and will catch regressions.
bors added a commit that referenced this pull request Dec 18, 2025
…uwer

Rollup of 11 pull requests

Successful merges:

 - #145933 (Expand `str_as_str` to more types)
 - #148849 (Set -Cpanic=abort in windows-msvc stack protector tests)
 - #149925 (`cfg_select!`: parse unused branches)
 - #150022 (Generate macro expansion for rust compiler crates docs)
 - #150024 (Support recursive delegation)
 - #150048 (std_detect: AArch64 Darwin: expose SME F16F16 and B16B16 features)
 - #150083 (tests/run-make-cargo/same-crate-name-and-macro-name: New regression test)
 - #150102 (Fixed ICE for EII with multiple defaults due to duplicate definition in nameres)
 - #150124 (unstable.rs: fix typos in comments (implementatble -> implementable))
 - #150125 (Port `#[rustc_lint_opt_deny_field_access]` to attribute parser)
 - #150126 (Subtree sync for rustc_codegen_cranelift)

Failed merges:

 - #150127 (Port `#[rustc_lint_untracked_query_information]` and `#[rustc_lint_diagnostics]` to using attribute parsers)

r? `@ghost`
`@rustbot` modify labels: rollup
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Dec 18, 2025
…ivooeo

tests/run-make-cargo/same-crate-name-and-macro-name: New regression test

Closes rust-lang#71259 which just **E-needs-test**. See rust-lang#71259 (comment) for a good description of what we should test (which we do in this PR).

The project we add fails with an old nightly without the fix:

```console
$ cargo +nightly-2020-03-10 run
   Compiling consumer v0.1.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/consumer)
    Finished dev [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/consumer`
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `"version 1"`,
 right: `"version 2"`', src/main.rs:6:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

and passes with a recent toolchain:

```console
$ cargo run
warning: /home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/consumer/Cargo.toml: no edition set: defaulting to the 2015 edition while the latest is 2024
warning: /home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v1/Cargo.toml: no edition set: defaulting to the 2015 edition while the latest is 2024
warning: /home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v2/Cargo.toml: no edition set: defaulting to the 2015 edition while the latest is 2024
   Compiling mylib v2.0.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v2)
   Compiling mylib v1.0.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v1)
   Compiling consumer v0.1.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/consumer)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/consumer`
```

in other words, the test tests what it should and will catch regressions.
bors added a commit that referenced this pull request Dec 18, 2025
…uwer

Rollup of 12 pull requests

Successful merges:

 - #145933 (Expand `str_as_str` to more types)
 - #148849 (Set -Cpanic=abort in windows-msvc stack protector tests)
 - #149925 (`cfg_select!`: parse unused branches)
 - #149952 (Suggest struct pattern when destructuring Range with .. syntax)
 - #150022 (Generate macro expansion for rust compiler crates docs)
 - #150024 (Support recursive delegation)
 - #150048 (std_detect: AArch64 Darwin: expose SME F16F16 and B16B16 features)
 - #150083 (tests/run-make-cargo/same-crate-name-and-macro-name: New regression test)
 - #150102 (Fixed ICE for EII with multiple defaults due to duplicate definition in nameres)
 - #150124 (unstable.rs: fix typos in comments (implementatble -> implementable))
 - #150125 (Port `#[rustc_lint_opt_deny_field_access]` to attribute parser)
 - #150126 (Subtree sync for rustc_codegen_cranelift)

Failed merges:

 - #150127 (Port `#[rustc_lint_untracked_query_information]` and `#[rustc_lint_diagnostics]` to using attribute parsers)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

Duplicate crate macros failing to differentiate

7 participants