Skip to content

Commit 21b5c1d

Browse files
authored
Rollup merge of rust-lang#61660 - petrochenkov:nocusta, r=Centril
Minimize use of `#![feature(custom_attribute)]` Some preparations before resurrecting rust-lang#57921.
2 parents 2410b4d + ee189ae commit 21b5c1d

File tree

71 files changed

+656
-721
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+656
-721
lines changed

src/doc/rustc/src/lints/listing/warn-by-default.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -728,19 +728,17 @@ This lint detects attributes that were not used by the compiler. Some
728728
example code that triggers this lint:
729729

730730
```rust
731-
#![feature(custom_attribute)]
732-
733-
#![mutable_doc]
731+
#![macro_export]
734732
```
735733

736734
This will produce:
737735

738736
```text
739737
warning: unused attribute
740-
--> src/main.rs:4:1
738+
--> src/main.rs:1:1
741739
|
742-
4 | #![mutable_doc]
743-
| ^^^^^^^^^^^^^^^
740+
1 | #![macro_export]
741+
| ^^^^^^^^^^^^^^^^
744742
|
745743
```
746744

src/liballoc/alloc.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ extern "Rust" {
1515
// them from the `#[global_allocator]` attribute if there is one, or uses the
1616
// default implementations in libstd (`__rdl_alloc` etc in `src/libstd/alloc.rs`)
1717
// otherwise.
18-
#[allocator]
18+
#[cfg_attr(bootstrap, allocator)]
19+
#[cfg_attr(not(bootstrap), rustc_allocator)]
1920
#[rustc_allocator_nounwind]
2021
fn __rust_alloc(size: usize, align: usize) -> *mut u8;
2122
#[rustc_allocator_nounwind]

src/liballoc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
#![feature(coerce_unsized)]
8080
#![feature(dispatch_from_dyn)]
8181
#![feature(core_intrinsics)]
82-
#![feature(custom_attribute)]
82+
#![cfg_attr(bootstrap, feature(custom_attribute))]
8383
#![feature(dropck_eyepatch)]
8484
#![feature(exact_size_is_empty)]
8585
#![feature(fmt_internals)]

src/libcore/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@
7575
#![feature(concat_idents)]
7676
#![feature(const_fn)]
7777
#![feature(const_fn_union)]
78-
#![feature(custom_attribute)]
7978
#![feature(doc_cfg)]
8079
#![feature(doc_spotlight)]
8180
#![feature(extern_types)]

src/librustc/hir/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2574,7 +2574,7 @@ bitflags! {
25742574
/// `#[cold]`: a hint to LLVM that this function, when called, is never on
25752575
/// the hot path.
25762576
const COLD = 1 << 0;
2577-
/// `#[allocator]`: a hint to LLVM that the pointer returned from this
2577+
/// `#[rustc_allocator]`: a hint to LLVM that the pointer returned from this
25782578
/// function is never null.
25792579
const ALLOCATOR = 1 << 1;
25802580
/// `#[unwind]`: an indicator that this function may unwind despite what

src/librustc_codegen_llvm/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#![feature(box_syntax)]
1111
#![feature(const_cstr_unchecked)]
1212
#![feature(crate_visibility_modifier)]
13-
#![feature(custom_attribute)]
1413
#![feature(extern_types)]
1514
#![feature(in_band_lifetimes)]
1615
#![allow(unused_attributes)]

src/librustc_codegen_ssa/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#![feature(box_patterns)]
44
#![feature(box_syntax)]
55
#![feature(core_intrinsics)]
6-
#![feature(custom_attribute)]
76
#![feature(libc)]
87
#![feature(rustc_diagnostic_macros)]
98
#![feature(stmt_expr_attributes)]

src/librustc_codegen_utils/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#![feature(box_patterns)]
99
#![feature(box_syntax)]
1010
#![feature(core_intrinsics)]
11-
#![feature(custom_attribute)]
1211
#![feature(never_type)]
1312
#![feature(nll)]
1413
#![allow(unused_attributes)]

src/librustc_errors/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
22

3-
#![feature(custom_attribute)]
43
#![allow(unused_attributes)]
54
#![cfg_attr(unix, feature(libc))]
65
#![feature(nll)]

src/librustc_save_analysis/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
2-
#![feature(custom_attribute)]
32
#![feature(nll)]
43
#![deny(rust_2018_idioms)]
54
#![deny(internal)]

0 commit comments

Comments
 (0)