Skip to content

Add tests for -Zcrate-attr edition and position - #165429

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Urgau:crate-attr-edition-position
Nov 5, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Urgau:crate-attr-edition-position

Conversation

@Urgau

@Urgau Urgau commented Nov 3, 2026

Copy link
Copy Markdown
Member

This PR adds new tests for -Z crate-attr:

  • first we check that the edition of the crate attributes is the same as --edition
  • second we add a test for file!(), line!() and column!()

Note that contrary to RFC we currently consider #![ and ] relevant.

@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 Nov 3, 2026
@rustbot

rustbot commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

r? @nnethercote

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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 77 candidates
  • Random selection from 20 candidates

@Urgau
Urgau force-pushed the crate-attr-edition-position branch from 7b8d8aa to 138b927 Compare November 4, 2026 06:42
@wesleywiser

Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors

rust-bors Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 138b927 has been approved by wesleywiser

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Nov 4, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Nov 5, 2026
… r=wesleywiser

Add tests for `-Zcrate-attr` edition and position

This PR adds new tests for `-Z crate-attr`:
 - first we check that the edition of the crate attributes is the same as `--edition`
 - second we add a test for `file!()`, `line!()` and `column!()`

Note that [contrary to RFC](https://github.com/rust-lang/rfcs/blob/main/text/3791-crate-attr.md#spans-modules-and-editions) we currently consider `#![` and `]` relevant.
jhpratt added a commit to jhpratt/rust that referenced this pull request Nov 5, 2026
… r=wesleywiser

Add tests for `-Zcrate-attr` edition and position

This PR adds new tests for `-Z crate-attr`:
 - first we check that the edition of the crate attributes is the same as `--edition`
 - second we add a test for `file!()`, `line!()` and `column!()`

Note that [contrary to RFC](https://github.com/rust-lang/rfcs/blob/main/text/3791-crate-attr.md#spans-modules-and-editions) we currently consider `#![` and `]` relevant.
rust-bors Bot pushed a commit that referenced this pull request Nov 5, 2026
Rollup of 13 pull requests

Successful merges:

 - #163477 (Fancy paramenv accessors that communicate the access pattern better.)
 - #160593 (turn ABI-controlling target features into a target modifier)
 - #164896 (offload: pass the linked device image to the host pass)
 - #165468 (Remove return type from `BuilderMethods::store`)
 - #159374 (Lower #[no_mangle] to #[symbol_name]/#[link_name])
 - #164564 (Re-enable outline-atomics by default on more AArch64 platforms)
 - #164623 (add next-solver regression tests for two fixed ices)
 - #164678 (add next-solver regression test for recursive opaque ICE under validate-mir)
 - #165429 (Add tests for `-Zcrate-attr` edition and position)
 - #165430 ([tiny] Show context for found assoc item in E0107)
 - #165456 (std: Fix build for the L4Re targets)
 - #165463 (Add BTreeMap::allocator and BTreeSet::allocator)
 - #165466 (Don't "exit" using `panic` on teeos)
rust-bors Bot pushed a commit that referenced this pull request Nov 5, 2026
Rollup of 15 pull requests

Successful merges:

 - #163477 (Fancy paramenv accessors that communicate the access pattern better.)
 - #160593 (turn ABI-controlling target features into a target modifier)
 - #164896 (offload: pass the linked device image to the host pass)
 - #165468 (Remove return type from `BuilderMethods::store`)
 - #164564 (Re-enable outline-atomics by default on more AArch64 platforms)
 - #164623 (add next-solver regression tests for two fixed ices)
 - #164653 (Deprecate internal function `vec::from_elem`)
 - #164678 (add next-solver regression test for recursive opaque ICE under validate-mir)
 - #165387 (windows OpenOptionsExt examples: replace winapi by windows crate)
 - #165429 (Add tests for `-Zcrate-attr` edition and position)
 - #165430 ([tiny] Show context for found assoc item in E0107)
 - #165456 (std: Fix build for the L4Re targets)
 - #165463 (Add BTreeMap::allocator and BTreeSet::allocator)
 - #165466 (Don't "exit" using `panic` on teeos)
 - #165491 (Remove unused compiler types and associated helpers)
@rust-bors
rust-bors Bot merged commit c29c21f into rust-lang:main Nov 5, 2026
14 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Nov 5, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 5, 2026
Rollup merge of #165429 - Urgau:crate-attr-edition-position, r=wesleywiser

Add tests for `-Zcrate-attr` edition and position

This PR adds new tests for `-Z crate-attr`:
 - first we check that the edition of the crate attributes is the same as `--edition`
 - second we add a test for `file!()`, `line!()` and `column!()`

Note that [contrary to RFC](https://github.com/rust-lang/rfcs/blob/main/text/3791-crate-attr.md#spans-modules-and-editions) we currently consider `#![` and `]` relevant.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

4 participants