forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#128481 - matthiaskrgr:rollup-efa706r, r=matth…
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#128416 (android: Remove libstd hacks for unsupported Android APIs) - rust-lang#128437 (improve bootstrap to allow selecting llvm tools individually) - rust-lang#128450 (Create COFF archives for non-LLVM backends) - rust-lang#128458 (Emit an error if `#[optimize]` is applied to an incompatible item) - rust-lang#128477 (Finish blessing `coverage/mcdc` tests after LLVM 19 upgrade) - rust-lang#128478 (Ignore `use` declaration reformatting in `.git-blame-ignore-revs`.) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
18 changed files
with
122 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#![feature(optimize_attribute)] | ||
#![feature(stmt_expr_attributes)] | ||
#![deny(unused_attributes)] | ||
#![allow(dead_code)] | ||
|
||
#[optimize(speed)] //~ ERROR attribute should be applied to function or closure | ||
struct F; | ||
|
||
fn invalid() { | ||
#[optimize(speed)] //~ ERROR attribute should be applied to function or closure | ||
{ | ||
1 | ||
}; | ||
} | ||
|
||
#[optimize(speed)] | ||
fn valid() {} | ||
|
||
#[optimize(speed)] | ||
mod valid_module {} | ||
|
||
#[optimize(speed)] | ||
impl F {} | ||
|
||
fn main() { | ||
let _ = #[optimize(speed)] | ||
(|| 1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
error: attribute should be applied to function or closure | ||
--> $DIR/optimize.rs:6:1 | ||
| | ||
LL | #[optimize(speed)] | ||
| ^^^^^^^^^^^^^^^^^^ | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/optimize.rs:3:9 | ||
| | ||
LL | #![deny(unused_attributes)] | ||
| ^^^^^^^^^^^^^^^^^ | ||
|
||
error: attribute should be applied to function or closure | ||
--> $DIR/optimize.rs:10:5 | ||
| | ||
LL | #[optimize(speed)] | ||
| ^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
|