Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
12a833a
Add lint rule for `#[deprecated]` on `use`
kailan Oct 22, 2024
ca664bb
Merge `#[deprecated]` on `use` test with existing `deprecation-sanity…
kailan Oct 22, 2024
2ce89ee
Add a test for mangling of named constants in const generics and arra…
oli-obk Dec 9, 2024
9ecdc54
Try to evaluate constants in legacy mangling
oli-obk Dec 9, 2024
de53fe2
coverage: Tidy up creation of covmap records
Zalathar Dec 12, 2024
5f5745b
coverage: Tidy up creation of covfun records
Zalathar Dec 12, 2024
2a6a7be
don't show the full linker args unless `--verbose` is passed
jyn514 Dec 25, 2023
37bb774
Reduce the need to set archiver via environment variables
flba-eb Dec 12, 2024
3a90c47
Fix powerpc64 big-endian FreeBSD ABI
taiki-e Oct 25, 2024
3d2e36c
upstream rustc_codegen_llvm changes for enzyme/autodiff
ZuseZ4 Dec 12, 2024
7fb2fc0
feat: clarify how to use `black_box()`
BD103 Dec 5, 2024
2e412fe
Remove `Lexer`'s dependency on `Parser`.
nnethercote Dec 12, 2024
929b5f8
Rollup merge of #130060 - EnzymeAD:enzyme-cg-llvm, r=davidtwco
Zalathar Dec 13, 2024
e4f3fde
Rollup merge of #132038 - kailan:deprecated-use, r=pnkfelix
Zalathar Dec 13, 2024
5289d55
Rollup merge of #132150 - taiki-e:ppc64-freebsd-abi, r=pnkfelix
Zalathar Dec 13, 2024
7e469b7
Rollup merge of #133633 - jyn514:hide-linker-args, r=bjorn3,jyn514
Zalathar Dec 13, 2024
fa4b7cc
Rollup merge of #133942 - BD103:black-box-docs, r=saethlin
Zalathar Dec 13, 2024
cb27eea
Rollup merge of #134081 - oli-obk:push-prpsqxxynxnq, r=BoxyUwU
Zalathar Dec 13, 2024
0dbf0c1
Rollup merge of #134192 - nnethercote:rm-Lexer-Parser-dep, r=compiler…
Zalathar Dec 13, 2024
101806e
Rollup merge of #134208 - Zalathar:covmap-covfun, r=compiler-errors
Zalathar Dec 13, 2024
0207615
Rollup merge of #134211 - flba-eb:add_qnx_archiver, r=compiler-errors
Zalathar Dec 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions compiler/rustc_passes/src/stability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,9 @@ impl<'a, 'tcx> Visitor<'tcx> for Annotator<'a, 'tcx> {
kind = AnnotationKind::DeprecationProhibited;
const_stab_inherit = InheritConstStability::Yes;
}
hir::ItemKind::Use(_, _) => {
kind = AnnotationKind::DeprecationProhibited;
}
hir::ItemKind::Struct(ref sd, _) => {
if let Some(ctor_def_id) = sd.ctor_def_id() {
self.annotate(
Expand Down
5 changes: 0 additions & 5 deletions library/core/src/alloc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ pub use self::global::GlobalAlloc;
#[stable(feature = "alloc_layout", since = "1.28.0")]
pub use self::layout::Layout;
#[stable(feature = "alloc_layout", since = "1.28.0")]
#[deprecated(
since = "1.52.0",
note = "Name does not follow std convention, use LayoutError",
suggestion = "LayoutError"
)]
#[allow(deprecated, deprecated_in_future)]
pub use self::layout::LayoutErr;
#[stable(feature = "alloc_layout_error", since = "1.50.0")]
Expand Down
3 changes: 1 addition & 2 deletions library/std/src/collections/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,7 @@ pub use self::hash_map::HashMap;
#[doc(inline)]
pub use self::hash_set::HashSet;
#[stable(feature = "rust1", since = "1.0.0")]
// FIXME(#82080) The deprecation here is only theoretical, and does not actually produce a warning.
#[deprecated(note = "moved to `std::ops::Bound`", since = "1.26.0")]
// FIXME(#82080) This has moved but #[deprecated] on `use` is unsupported.
#[doc(hidden)]
pub use crate::ops::Bound;

Expand Down
7 changes: 7 additions & 0 deletions tests/ui/deprecation/deprecation-sanity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,11 @@ impl Default for X {
}
}

mod inner {
pub struct Y;
}

#[deprecated] //~ ERROR this `#[deprecated]` annotation has no effect
pub use inner::Y;

fn main() { }
8 changes: 7 additions & 1 deletion tests/ui/deprecation/deprecation-sanity.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@ LL | #[deprecated = "hello"]
|
= note: `#[deny(useless_deprecated)]` on by default

error: aborting due to 10 previous errors
error: this `#[deprecated]` annotation has no effect
--> $DIR/deprecation-sanity.rs:46:1
|
LL | #[deprecated]
| ^^^^^^^^^^^^^ help: remove the unnecessary deprecation attribute

error: aborting due to 11 previous errors

Some errors have detailed explanations: E0538, E0539, E0541, E0565.
For more information about an error, try `rustc --explain E0538`.
1 change: 1 addition & 0 deletions tests/ui/imports/unused-import-issue-87973.fixed
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ run-rustfix
#![deny(unused_imports)]
#![allow(useless_deprecated)]

// Check that attributes get removed too. See #87973.
//~^ ERROR unused import
Expand Down
1 change: 1 addition & 0 deletions tests/ui/imports/unused-import-issue-87973.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ run-rustfix
#![deny(unused_imports)]
#![allow(useless_deprecated)]

// Check that attributes get removed too. See #87973.
#[deprecated]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/imports/unused-import-issue-87973.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: unused import: `std::fs`
--> $DIR/unused-import-issue-87973.rs:8:5
--> $DIR/unused-import-issue-87973.rs:9:5
|
LL | use std::fs;
| ^^^^^^^
Expand Down