diff options
| author | bors <bors@rust-lang.org> | 2023-09-11 16:50:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-09-11 16:50:22 +0000 |
| commit | 0a199e4e93d2c7cfa7e0bee831e5aed03250fab4 (patch) | |
| tree | ca3aa84c2f830f3fca904de76fa2dc436ec15e41 /src | |
| parent | 3ebb5629d1a39345d37c4838d31dc7280384ea94 (diff) | |
| parent | 9ed6eea86ba3b6c66e448d8be971b302a5788742 (diff) | |
| download | rust-0a199e4e93d2c7cfa7e0bee831e5aed03250fab4.tar.gz rust-0a199e4e93d2c7cfa7e0bee831e5aed03250fab4.zip | |
Auto merge of #115758 - matthiaskrgr:rollup-khwbjj7, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #115335 (fix overflow in array length computation) - #115440 (bootstrap/format: remove unnecessary paths.push) - #115702 (Update mailmap) - #115727 (Implement fallback for effect param) - #115739 (Call `LateLintPass::check_attribute` from `with_lint_attrs`) - #115743 (Point out if a local trait has no implementations) - #115744 (Improve diagnostic for generic params from outer items (E0401)) - #115752 (rustdoc: Add missing "Aliased type" title in the sidebar) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/format.rs | 4 | ||||
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 2 | ||||
| -rw-r--r-- | src/librustdoc/html/markdown.rs | 1 | ||||
| -rw-r--r-- | src/librustdoc/html/render/sidebar.rs | 1 | ||||
| -rw-r--r-- | src/tools/clippy/tests/ui/allow_attributes.fixed | 7 | ||||
| -rw-r--r-- | src/tools/clippy/tests/ui/allow_attributes.rs | 7 | ||||
| -rw-r--r-- | src/tools/clippy/tests/ui/blanket_clippy_restriction_lints.stderr | 14 |
7 files changed, 24 insertions, 12 deletions
diff --git a/src/bootstrap/format.rs b/src/bootstrap/format.rs index d658be0b8eb..11f2762f766 100644 --- a/src/bootstrap/format.rs +++ b/src/bootstrap/format.rs @@ -127,8 +127,6 @@ pub fn format(build: &Builder<'_>, check: bool, paths: &[PathBuf]) { Err(_) => false, }; - let mut paths = paths.to_vec(); - if git_available { let in_working_tree = match build .config @@ -201,8 +199,6 @@ pub fn format(build: &Builder<'_>, check: bool, paths: &[PathBuf]) { "WARN: Something went wrong when running git commands:\n{err}\n\ Falling back to formatting all files." ); - // Something went wrong when getting the version. Just format all the files. - paths.push(".".into()); } } } diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 1f6e832c7cb..f30384701cb 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -542,7 +542,7 @@ fn clean_generic_param_def<'tcx>( }, ) } - ty::GenericParamDefKind::Const { has_default } => ( + ty::GenericParamDefKind::Const { has_default, .. } => ( def.name, GenericParamDefKind::Const { ty: Box::new(clean_middle_ty( diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs index a8d85fb6fb4..b28019e3f91 100644 --- a/src/librustdoc/html/markdown.rs +++ b/src/librustdoc/html/markdown.rs @@ -1609,6 +1609,7 @@ fn init_id_map() -> FxHashMap<Cow<'static, str>, usize> { map.insert("blanket-implementations-list".into(), 1); map.insert("deref-methods".into(), 1); map.insert("layout".into(), 1); + map.insert("aliased-type".into(), 1); map } diff --git a/src/librustdoc/html/render/sidebar.rs b/src/librustdoc/html/render/sidebar.rs index 6466ae825d7..76f63c6f63e 100644 --- a/src/librustdoc/html/render/sidebar.rs +++ b/src/librustdoc/html/render/sidebar.rs @@ -237,6 +237,7 @@ fn sidebar_type_alias<'a>( ) -> Vec<LinkBlock<'a>> { let mut items = vec![]; if let Some(inner_type) = &t.inner_type { + items.push(LinkBlock::forced(Link::new("aliased-type", "Aliased type"))); match inner_type { clean::TypeAliasInnerType::Enum { variants, is_non_exhaustive: _ } => { let mut variants = variants diff --git a/src/tools/clippy/tests/ui/allow_attributes.fixed b/src/tools/clippy/tests/ui/allow_attributes.fixed index 945ba83611c..b506a9890f5 100644 --- a/src/tools/clippy/tests/ui/allow_attributes.fixed +++ b/src/tools/clippy/tests/ui/allow_attributes.fixed @@ -22,6 +22,13 @@ struct T4; #[cfg_attr(panic = "unwind", expect(dead_code))] struct CfgT; +#[allow(clippy::allow_attributes, unused)] +struct Allowed; + +#[expect(clippy::allow_attributes)] +#[allow(unused)] +struct Expected; + fn ignore_external() { external! { #[allow(clippy::needless_borrow)] // Should not lint diff --git a/src/tools/clippy/tests/ui/allow_attributes.rs b/src/tools/clippy/tests/ui/allow_attributes.rs index 8afa61c7002..c7daa7abd9d 100644 --- a/src/tools/clippy/tests/ui/allow_attributes.rs +++ b/src/tools/clippy/tests/ui/allow_attributes.rs @@ -22,6 +22,13 @@ struct T4; #[cfg_attr(panic = "unwind", allow(dead_code))] struct CfgT; +#[allow(clippy::allow_attributes, unused)] +struct Allowed; + +#[expect(clippy::allow_attributes)] +#[allow(unused)] +struct Expected; + fn ignore_external() { external! { #[allow(clippy::needless_borrow)] // Should not lint diff --git a/src/tools/clippy/tests/ui/blanket_clippy_restriction_lints.stderr b/src/tools/clippy/tests/ui/blanket_clippy_restriction_lints.stderr index d04ea7151c2..afb634f34b4 100644 --- a/src/tools/clippy/tests/ui/blanket_clippy_restriction_lints.stderr +++ b/src/tools/clippy/tests/ui/blanket_clippy_restriction_lints.stderr @@ -1,17 +1,12 @@ error: `clippy::restriction` is not meant to be enabled as a group - | - = note: because of the command line `--warn clippy::restriction` - = help: enable the restriction lints you need individually - = note: `-D clippy::blanket-clippy-restriction-lints` implied by `-D warnings` - = help: to override `-D warnings` add `#[allow(clippy::blanket_clippy_restriction_lints)]` - -error: `clippy::restriction` is not meant to be enabled as a group --> $DIR/blanket_clippy_restriction_lints.rs:6:9 | LL | #![warn(clippy::restriction)] | ^^^^^^^^^^^^^^^^^^^ | = help: enable the restriction lints you need individually + = note: `-D clippy::blanket-clippy-restriction-lints` implied by `-D warnings` + = help: to override `-D warnings` add `#[allow(clippy::blanket_clippy_restriction_lints)]` error: `clippy::restriction` is not meant to be enabled as a group --> $DIR/blanket_clippy_restriction_lints.rs:8:9 @@ -29,5 +24,10 @@ LL | #![forbid(clippy::restriction)] | = help: enable the restriction lints you need individually +error: `clippy::restriction` is not meant to be enabled as a group + | + = note: because of the command line `--warn clippy::restriction` + = help: enable the restriction lints you need individually + error: aborting due to 4 previous errors |
