Skip to content

Commit 8a70352

Browse files
committed
Auto merge of rust-lang#154339 - JonathanBrouwer:rollup-FPeeGxJ, r=JonathanBrouwer
Rollup of 3 pull requests Successful merges: - rust-lang#154311 ([libcore] Disable `doc(auto_cfg)` for integers trait impls) - rust-lang#154331 (allow `incomplete_features` in all ui tests) - rust-lang#154336 (Remove more BuiltinLintDiag variants - part 3)
2 parents 362211d + d54a564 commit 8a70352

File tree

130 files changed

+106
-840
lines changed

Some content is hidden

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

130 files changed

+106
-840
lines changed

‎compiler/rustc_lint/src/early/diagnostics.rs‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,6 @@ impl<'a> Diagnostic<'a, ()> for DecorateBuiltinLint<'_, '_> {
153153
.into_diag(dcx, level)
154154
}
155155

156-
BuiltinLintDiag::UnusedCrateDependency { extern_crate, local_crate } => {
157-
lints::UnusedCrateDependency { extern_crate, local_crate }.into_diag(dcx, level)
158-
}
159156
BuiltinLintDiag::AttributeLint(kind) => {
160157
DecorateAttrLint { sess: self.sess, tcx: self.tcx, diagnostic: &kind }
161158
.into_diag(dcx, level)

‎compiler/rustc_lint/src/lints.rs‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2994,14 +2994,6 @@ pub(crate) mod unexpected_cfg_value {
29942994
}
29952995
}
29962996

2997-
#[derive(Diagnostic)]
2998-
#[diag("extern crate `{$extern_crate}` is unused in crate `{$local_crate}`")]
2999-
#[help("remove the dependency or add `use {$extern_crate} as _;` to the crate root")]
3000-
pub(crate) struct UnusedCrateDependency {
3001-
pub extern_crate: Symbol,
3002-
pub local_crate: Symbol,
3003-
}
3004-
30052997
// FIXME(jdonszelmann): duplicated in rustc_attr_parsing, should be moved there completely.
30062998
#[derive(Diagnostic)]
30072999
#[diag(

‎compiler/rustc_lint_defs/src/lib.rs‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -690,10 +690,6 @@ pub enum BuiltinLintDiag {
690690
/// Indicates if the named argument is used as a width/precision for formatting
691691
is_formatting_arg: bool,
692692
},
693-
UnusedCrateDependency {
694-
extern_crate: Symbol,
695-
local_crate: Symbol,
696-
},
697693
AttributeLint(AttributeLintKind),
698694
}
699695

‎compiler/rustc_metadata/src/creader.rs‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,14 @@ use rustc_middle::bug;
2323
use rustc_middle::ty::data_structures::IndexSet;
2424
use rustc_middle::ty::{TyCtxt, TyCtxtFeed};
2525
use rustc_proc_macro::bridge::client::ProcMacro;
26-
use rustc_session::Session;
2726
use rustc_session::config::{
2827
CrateType, ExtendedTargetModifierInfo, ExternLocation, Externs, OptionsTargetModifiers,
2928
TargetModifier,
3029
};
3130
use rustc_session::cstore::{CrateDepKind, CrateSource, ExternCrate, ExternCrateSource};
32-
use rustc_session::lint::{self, BuiltinLintDiag};
3331
use rustc_session::output::validate_crate_name;
3432
use rustc_session::search_paths::PathKind;
33+
use rustc_session::{Session, lint};
3534
use rustc_span::def_id::DefId;
3635
use rustc_span::edition::Edition;
3736
use rustc_span::{DUMMY_SP, Ident, Span, Symbol, sym};
@@ -1211,7 +1210,7 @@ impl CStore {
12111210
lint::builtin::UNUSED_CRATE_DEPENDENCIES,
12121211
span,
12131212
ast::CRATE_NODE_ID,
1214-
BuiltinLintDiag::UnusedCrateDependency {
1213+
errors::UnusedCrateDependency {
12151214
extern_crate: name_interned,
12161215
local_crate: tcx.crate_name(LOCAL_CRATE),
12171216
},

‎compiler/rustc_metadata/src/errors.rs‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,3 +688,11 @@ pub struct RawDylibMalformed {
688688
#[primary_span]
689689
pub span: Span,
690690
}
691+
692+
#[derive(Diagnostic)]
693+
#[diag("extern crate `{$extern_crate}` is unused in crate `{$local_crate}`")]
694+
#[help("remove the dependency or add `use {$extern_crate} as _;` to the crate root")]
695+
pub(crate) struct UnusedCrateDependency {
696+
pub extern_crate: Symbol,
697+
pub local_crate: Symbol,
698+
}

‎library/core/src/fmt/num.rs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,13 +594,15 @@ impl_Debug! {
594594
// Include wasm32 in here since it doesn't reflect the native pointer size, and
595595
// often cares strongly about getting a smaller code size.
596596
#[cfg(any(target_pointer_width = "64", target_arch = "wasm32"))]
597+
#[doc(auto_cfg = false)]
597598
mod imp {
598599
use super::*;
599600
impl_Display!(i8, u8, i16, u16, i32, u32, i64, u64, isize, usize; as u64 into display_u64);
600601
impl_Exp!(i8, u8, i16, u16, i32, u32, i64, u64, isize, usize; as u64 into exp_u64);
601602
}
602603

603604
#[cfg(not(any(target_pointer_width = "64", target_arch = "wasm32")))]
605+
#[doc(auto_cfg = false)]
604606
mod imp {
605607
use super::*;
606608
impl_Display!(i8, u8, i16, u16, i32, u32, isize, usize; as u32 into display_u32);

‎src/tools/compiletest/src/runtest.rs‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1921,10 +1921,7 @@ impl<'test> TestCx<'test> {
19211921

19221922
// Allow tests to use internal and incomplete features.
19231923
compiler.args(&["-A", "internal_features"]);
1924-
// FIXME(#154168); temporarily exclude some directories to make the transition easier
1925-
if !input_file.iter().any(|p| p == "specialization") {
1926-
compiler.args(&["-A", "incomplete_features"]);
1927-
}
1924+
compiler.args(&["-A", "incomplete_features"]);
19281925

19291926
// Allow tests to have unused parens and braces.
19301927
// Add #![deny(unused_parens, unused_braces)] to the test file if you want to

‎tests/ui/specialization/assoc-ty-graph-cycle.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// Make sure we don't crash with a cycle error during coherence.
44

5-
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
5+
#![feature(specialization)]
66

77
trait Trait<T> {
88
type Assoc;

‎tests/ui/specialization/assoc-ty-graph-cycle.stderr‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎tests/ui/specialization/coherence/default-impl-normalization-ambig-2.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// regression test for #118987
2-
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
2+
#![feature(specialization)]
33

44
trait Assoc {
55
type Output;

0 commit comments

Comments
 (0)