Rollup merge of #64471 - Mark-Simulacrum:warn-depr-attr, r=Centril
Warn on no_start, crate_id attribute use These attributes are now deprecated; they don't have any use anymore. `no_start` stopped being applicable in3ee916e50bas part of #18967. Ideally we would've removed it pre-1.0, but since that didn't happen let's at least mark it deprecated. `crate_id` was renamed to `crate_name` in50ee1ec1b4as part of #15319. Ideally we would've followed that up with a removal of crate_id itself as well, but that didn't happen; this PR finally marks it as deprecated at least. Fixes https://github.com/rust-lang/rust/issues/43142 and resolves https://github.com/rust-lang/rust/issues/43144.
This commit is contained in:
commit
3e4c7786e9
6 changed files with 37 additions and 15 deletions
|
|
@ -11,8 +11,6 @@
|
|||
#![rustc_dummy]
|
||||
#![rustc_dummy(attr5)]
|
||||
|
||||
#![crate_id="foobar#0.1"]
|
||||
|
||||
// These are attributes of the following mod
|
||||
#[rustc_dummy = "val"]
|
||||
#[rustc_dummy = "val"]
|
||||
|
|
|
|||
|
|
@ -84,12 +84,12 @@
|
|||
#![crate_name = "0900"]
|
||||
#![crate_type = "bin"] // cannot pass "0800" here
|
||||
|
||||
// For #![crate_id], see issue #43142. (I cannot bear to enshrine current behavior in a test)
|
||||
#![crate_id = "10"] //~ WARN use of deprecated attribute
|
||||
|
||||
// FIXME(#44232) we should warn that this isn't used.
|
||||
#![feature(rust1)]
|
||||
|
||||
// For #![no_start], see issue #43144. (I cannot bear to enshrine current behavior in a test)
|
||||
#![no_start] //~ WARN use of deprecated attribute
|
||||
|
||||
// (cannot easily gating state of crate-level #[no_main]; but non crate-level is below at "0400")
|
||||
#![no_builtins]
|
||||
|
|
|
|||
|
|
@ -186,6 +186,20 @@ LL | mod inner { #![macro_escape] }
|
|||
|
|
||||
= help: consider an outer attribute, `#[macro_use]` mod ...
|
||||
|
||||
warning: use of deprecated attribute `crate_id`: no longer used.
|
||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:87:1
|
||||
|
|
||||
LL | #![crate_id = "10"]
|
||||
| ^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
||||
|
|
||||
= note: `#[warn(deprecated)]` on by default
|
||||
|
||||
warning: use of deprecated attribute `no_start`: no longer used.
|
||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:92:1
|
||||
|
|
||||
LL | #![no_start]
|
||||
| ^^^^^^^^^^^^ help: remove this attribute
|
||||
|
||||
warning: the feature `rust1` has been stable since 1.0.0 and no longer requires an attribute to enable
|
||||
--> $DIR/issue-43106-gating-of-builtin-attrs.rs:90:12
|
||||
|
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
#![feature(rustc_private)]
|
||||
|
||||
#![crate_id="rust_get_test_int"]
|
||||
|
||||
mod rustrt {
|
||||
extern crate libc;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
#![crate_id="issue-6919"]
|
||||
extern crate issue6919_3;
|
||||
|
||||
pub fn main() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue