Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 8 pull requests #138310

Merged
merged 90 commits into from
Mar 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
66368aa
Allow unsetting default cfgs
Veykril Feb 27, 2025
f19b205
Warn when the used toolchain looks too old for rust-analyzer
Veykril Feb 27, 2025
43c5e95
Normalize some assist names
Veykril Mar 2, 2025
2f9e558
add diagnostic for dangling dyn
Shourya742 Mar 2, 2025
1840f57
add diagnostic for dangling impl
Shourya742 Mar 2, 2025
c2a630e
Add dangling impl
Shourya742 Mar 3, 2025
c315ad9
Support tuple struct patterns for expand_rest_pattern assist
Veykril Mar 2, 2025
6610e60
Merge pull request #19244 from Veykril/push-nmnrnlysvyvk
Veykril Mar 3, 2025
73e0fe1
Merge pull request #19243 from Veykril/push-qrrqsywkwyzp
Veykril Mar 3, 2025
16644ba
Merge pull request #19261 from Veykril/push-rnqlyrvqpols
Veykril Mar 3, 2025
de07b17
Bump minimum supported toolchain to 1.82
lnicola Mar 3, 2025
d137fee
Merge pull request #19275 from lnicola/min-1-82
Veykril Mar 3, 2025
0d6dfc8
Improve keyword completion for 'let' and 'let mut'
Natural-selection1 Mar 4, 2025
120d549
change 'let mut' keyword completion into 'ietm' snippet
Natural-selection1 Mar 4, 2025
b9d157c
Twiddle with the rustup invocation on CI
lnicola Mar 5, 2025
9a8968f
Merge pull request #19265 from Shourya742/2025-03-01-add-dangling-dyn…
lnicola Mar 5, 2025
e260467
Merge pull request #19286 from lnicola/twiddle-ci
lnicola Mar 5, 2025
0ffef9b
minicore: Add size_of to prelude and add rust_2024 prelude
thaliaarchi Mar 5, 2025
653801b
Use size_of from the prelude instead of imported
thaliaarchi Mar 5, 2025
5ad05fb
Merge pull request #19288 from thaliaarchi/use-prelude-size-of
Veykril Mar 5, 2025
5421fba
add test cases for 'letm' keyword completion
Natural-selection1 Mar 5, 2025
049f4db
Add warning and debug information when `cargo metadata` fails
aibaars Mar 5, 2025
52525bc
Improve tracing log format in cargo_workspace.rs
aibaars Mar 5, 2025
87815f7
Use HIR unsafety information for unsafe syntax highlightng
Veykril Mar 3, 2025
b9f5453
Merge pull request #19274 from Veykril/push-pouwrwwrlrlt
Veykril Mar 5, 2025
8641805
Fix syntax highlightingg punct filtering ignoring mods
Veykril Mar 5, 2025
363297d
Merge pull request #19279 from Natural-selection1/master
Veykril Mar 5, 2025
2cff701
Merge pull request #19292 from Veykril/push-zonnrrlosqmv
Veykril Mar 5, 2025
bee6cdd
fix: Make RustAnalyzer:Run available in manifest file
alibektas Mar 5, 2025
d95d278
Adjust relevance scoring threshold to consistent with existing implem…
Natural-selection1 Mar 6, 2025
86741ea
Merge pull request #19297 from Natural-selection1/master
Veykril Mar 6, 2025
2e6292c
Merge pull request #19295 from alibektas/rust_analyzer_run_on_cargo_toml
Veykril Mar 6, 2025
66a1164
Change `%e` to `?e` to include detailed error message
aibaars Mar 6, 2025
6a3ede1
Merge pull request #19290 from aibaars/patch-1
Veykril Mar 6, 2025
860637a
Normalize projections in evaluated const display and layout calculation
ChayimFriedman2 Feb 27, 2025
fcb34b1
Pass the target crate in `HirFormatter`
ChayimFriedman2 Feb 27, 2025
92de0ff
Use correct crate for trait env in `render_const_scalar()`
ChayimFriedman2 Feb 27, 2025
0bd3229
Warn the user when a rename will change the meaning of the program
ChayimFriedman2 Feb 1, 2025
b58fc9c
Mark `rust-analyzer.showSyntaxTree` config option as requiring server…
ChayimFriedman2 Mar 6, 2025
c4f727b
Merge pull request #19304 from ChayimFriedman2/restart-syntax-tree
ChayimFriedman2 Mar 6, 2025
f68fd66
Fix logical error in relevance scoring implementation
Natural-selection1 Mar 7, 2025
16878eb
Refactor relevance scoring to use a named constant BASE_SCORE
Natural-selection1 Mar 7, 2025
c8d9d5a
Move project MSRV back to 1.78
Veykril Mar 7, 2025
5c6a124
Pop up a notification for the MSRV project loading warning
Veykril Mar 7, 2025
02c9b7c
Merge pull request #19307 from Natural-selection1/master
Veykril Mar 7, 2025
d11c5b8
Merge pull request #19308 from Veykril/push-rnrxutwlvmly
Veykril Mar 7, 2025
bdf602a
Log build script error output in `load_cargo::load_workspace_at`
aibaars Mar 7, 2025
e98837f
fix(hir): `VariantDef` is `impl HasSource`
snprajwal Mar 7, 2025
b6f1ce8
fix: do not apply editorconfig to git commit msg
snprajwal Mar 7, 2025
871be8f
Add missing `GH_TOKEN` environment variable
Kobzol Mar 8, 2025
ff67423
Fix checkout in post-merge workflow
Kobzol Mar 8, 2025
e88f892
Fix syntax fixup producing invalid punctuation
Feb 28, 2025
fee83ba
Generated doc update
Feb 28, 2025
bb82831
Bump chalk for built-in supports of async closures
ShoyuVanilla Feb 26, 2025
0e4f189
internal: Migrate `inline_local_variable` to `SyntaxEditor`
ShoyuVanilla Mar 9, 2025
965a0c0
fix: Prevent wrong invocations of `needs_parens_in` with non-ancestra…
ShoyuVanilla Mar 9, 2025
60da021
Merge pull request #19324 from ShoyuVanilla/migrate-inline-var
Veykril Mar 9, 2025
e1912f8
Rank ADT constructors as constructors for completion scoring
Veykril Mar 9, 2025
295c70e
Fix O(tests) stack usage in edition 2024 mergeable doctests
saethlin Mar 9, 2025
129545f
Merge pull request #19325 from Veykril/push-sxyvwwsmtxrr
Veykril Mar 10, 2025
f36e2ea
Merge pull request #19232 from ShoyuVanilla/issue-19196
Veykril Mar 10, 2025
b2501ef
Merge pull request #19252 from flodiebold/fix-fixup-delimiters
Veykril Mar 10, 2025
b2a4f3d
Merge pull request #19316 from snprajwal/git-commit-ec
Veykril Mar 10, 2025
71b9103
Merge pull request #19314 from snprajwal/variantdef-impl
Veykril Mar 10, 2025
c961ee6
Merge pull request #19311 from aibaars/log-build-script-error
Veykril Mar 10, 2025
7ee9ce8
Fix `path` macro hygiene
Veykril Mar 10, 2025
fdee1c1
Preparing for merge from rust-lang/rust
lnicola Mar 10, 2025
e1da1b0
Merge from rust-lang/rust
lnicola Mar 10, 2025
f53d1eb
Merge pull request #19327 from Veykril/push-qyyvkulltzpz
Veykril Mar 10, 2025
44fad0b
Merge pull request #19079 from ChayimFriedman2/rename-conflict
Veykril Mar 10, 2025
1483cb6
Handle empty test suites in job summary report
Kobzol Mar 10, 2025
1c8acd4
Merge pull request #19330 from ChayimFriedman2/normalize-projection
Veykril Mar 10, 2025
ee79f3e
Run proc-macro server tests are separate CI job
Veykril Mar 10, 2025
87d5bf2
Bump rustc crates
lnicola Mar 10, 2025
c372c55
Fix simd layout test
lnicola Mar 10, 2025
af32b22
Merge pull request #19328 from Veykril/push-umwykvoskvyp
Veykril Mar 10, 2025
1d983bf
Format code
lnicola Mar 10, 2025
52f39ff
Merge pull request #19331 from lnicola/sync-from-rust
lnicola Mar 10, 2025
063ef18
Revert "Use workspace lints for crates in `compiler/` #138084"
jieyouxu Mar 10, 2025
dc576cb
Add remark for missing llvm-tools component re. rustc_private linker …
xizheyin Mar 10, 2025
61122d1
Delegation: fix ICE with invalid MethodCall generation
Bryanskiy Mar 10, 2025
bc4f0bb
Pass InferCtxt to InlineAsmCtxt to properly taint on error
compiler-errors Mar 6, 2025
150e88c
Rollup merge of #137931 - xizheyin:issue-137421, r=jieyouxu
matthiaskrgr Mar 10, 2025
69c7e36
Rollup merge of #138138 - compiler-errors:inline-asm-tainting, r=oli-obk
matthiaskrgr Mar 10, 2025
739672c
Rollup merge of #138223 - Kobzol:fix-post-merge, r=marcoieni
matthiaskrgr Mar 10, 2025
5717cc9
Rollup merge of #138268 - Kobzol:fix-summary-nan, r=jieyouxu
matthiaskrgr Mar 10, 2025
0d63119
Rollup merge of #138278 - Bryanskiy:delegation-ice-1, r=petrochenkov
matthiaskrgr Mar 10, 2025
d1a875c
Rollup merge of #138281 - saethlin:mergeable-doctests-stacksize, r=Gu…
matthiaskrgr Mar 10, 2025
2abecee
Rollup merge of #138305 - lnicola:sync-from-ra, r=lnicola
matthiaskrgr Mar 10, 2025
44ec67f
Rollup merge of #138306 - jieyouxu:revert-workspace-lints, r=Noratrieb
matthiaskrgr Mar 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 8 additions & 2 deletions .github/workflows/post-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,21 @@ jobs:
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
# Make sure that we have enough commits to find the parent merge commit.
# Since all merges should be through merge commits, fetching two commits
# should be enough to get the parent bors merge commit.
fetch-depth: 2
- name: Perform analysis and send PR
env:
GH_TOKEN: ${{ github.token }}
run: |
# Get closest bors merge commit
PARENT_COMMIT=`git rev-list --author='bors <bors@rust-lang.org>' -n1 --first-parent HEAD^1`
echo "Parent: ${PARENT_COMMIT}"

# Find PR for the current commit
HEAD_PR=`gh pr list --search "${{ github.sha }}" --state merged --json number --jq '.[0].number'`

echo "Parent: ${PARENT_COMMIT}"
echo "HEAD: ${{ github.sha }} (#${HEAD_PR})"

cd src/ci/citool
Expand Down
14 changes: 0 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,6 @@ exclude = [
"src/tools/x",
]

# These lints are applied to many crates in the workspace. In practice, this is
# all crates under `compiler/`.
#
# NOTE: rustc-specific lints (e.g. `rustc::internal`) aren't supported by
# Cargo. (Support for them is possibly blocked by #44690 (attributes for
# tools).) Those lints are instead specified for `compiler/` crates in
# `src/bootstrap/src/core/builder/cargo.rs`.
[workspace.lints.rust]
# FIXME(edition_2024): Change this to `-Wrust_2024_idioms` when all of the
# individual lints are satisfied.
keyword_idents_2024 = "warn"
unreachable_pub = "warn"
unsafe_op_in_unsafe_fn = "warn"

[profile.release.package.rustc-rayon-core]
# The rustc fork of Rayon has deadlock detection code which intermittently
# causes overflows in the CI (see https://github.com/rust-lang/rust/issues/90227)
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,3 @@ llvm = ['rustc_driver_impl/llvm']
max_level_info = ['rustc_driver_impl/max_level_info']
rustc_randomized_layouts = ['rustc_driver_impl/rustc_randomized_layouts']
# tidy-alphabetical-end

[lints]
workspace = true
3 changes: 0 additions & 3 deletions compiler/rustc_abi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,3 @@ nightly = [
]
randomize = ["dep:rand", "dep:rand_xoshiro", "nightly"]
# tidy-alphabetical-end

[lints]
workspace = true
1 change: 1 addition & 0 deletions compiler/rustc_abi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#![cfg_attr(feature = "nightly", feature(rustc_attrs))]
#![cfg_attr(feature = "nightly", feature(rustdoc_internals))]
#![cfg_attr(feature = "nightly", feature(step_trait))]
#![warn(unreachable_pub)]
// tidy-alphabetical-end

/*! ABI handling for rustc
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_arena/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ edition = "2024"
# tidy-alphabetical-start
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
# tidy-alphabetical-end

[lints]
workspace = true
1 change: 1 addition & 0 deletions compiler/rustc_arena/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#![feature(maybe_uninit_slice)]
#![feature(rustc_attrs)]
#![feature(rustdoc_internals)]
#![warn(unreachable_pub)]
// tidy-alphabetical-end

use std::alloc::Layout;
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_ast/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,3 @@ smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
thin-vec = "0.2.12"
tracing = "0.1"
# tidy-alphabetical-end

[lints]
workspace = true
1 change: 1 addition & 0 deletions compiler/rustc_ast/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#![feature(never_type)]
#![feature(rustdoc_internals)]
#![feature(stmt_expr_attributes)]
#![warn(unreachable_pub)]
// tidy-alphabetical-end

pub mod util {
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_ast_ir/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,3 @@ nightly = [
"dep:rustc_macros",
"dep:rustc_span",
]

[lints]
workspace = true
1 change: 1 addition & 0 deletions compiler/rustc_ast_ir/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#![cfg_attr(feature = "nightly", allow(internal_features))]
#![cfg_attr(feature = "nightly", feature(never_type))]
#![cfg_attr(feature = "nightly", feature(rustc_attrs))]
#![warn(unreachable_pub)]
// tidy-alphabetical-end

#[cfg(feature = "nightly")]
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_ast_lowering/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
thin-vec = "0.2.12"
tracing = "0.1"
# tidy-alphabetical-end

[lints]
workspace = true
30 changes: 16 additions & 14 deletions compiler/rustc_ast_lowering/src/delegation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,25 +60,27 @@ pub(crate) struct DelegationResults<'hir> {
}

impl<'hir> LoweringContext<'_, 'hir> {
pub(crate) fn delegation_has_self(&self, item_id: NodeId, path_id: NodeId, span: Span) -> bool {
/// Defines whether the delegatee is an associated function whose first parameter is `self`.
pub(crate) fn delegatee_is_method(&self, item_id: NodeId, path_id: NodeId, span: Span) -> bool {
let sig_id = self.get_delegation_sig_id(item_id, path_id, span);
let Ok(sig_id) = sig_id else {
return false;
};
self.has_self(sig_id, span)
self.is_method(sig_id, span)
}

fn has_self(&self, def_id: DefId, span: Span) -> bool {
if let Some(local_sig_id) = def_id.as_local() {
// The value may be missing due to recursive delegation.
// Error will be emitted later during HIR ty lowering.
self.resolver.delegation_fn_sigs.get(&local_sig_id).is_some_and(|sig| sig.has_self)
} else {
match self.tcx.def_kind(def_id) {
DefKind::Fn => false,
DefKind::AssocFn => self.tcx.associated_item(def_id).fn_has_self_parameter,
_ => span_bug!(span, "unexpected DefKind for delegation item"),
}
fn is_method(&self, def_id: DefId, span: Span) -> bool {
match self.tcx.def_kind(def_id) {
DefKind::Fn => false,
DefKind::AssocFn => match def_id.as_local() {
Some(local_def_id) => self
.resolver
.delegation_fn_sigs
.get(&local_def_id)
.is_some_and(|sig| sig.has_self),
None => self.tcx.associated_item(def_id).fn_has_self_parameter,
},
_ => span_bug!(span, "unexpected DefKind for delegation item"),
}
}

Expand Down Expand Up @@ -324,7 +326,7 @@ impl<'hir> LoweringContext<'_, 'hir> {

let call = if self
.get_resolution_id(delegation.id, span)
.and_then(|def_id| Ok(self.has_self(def_id, span)))
.and_then(|def_id| Ok(self.is_method(def_id, span)))
.unwrap_or_default()
&& delegation.qself.is_none()
&& !has_generic_args
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_ast_lowering/src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
hir::AssocItemKind::Fn { has_self: sig.decl.has_self() }
}
AssocItemKind::Delegation(box delegation) => hir::AssocItemKind::Fn {
has_self: self.delegation_has_self(i.id, delegation.id, i.span),
has_self: self.delegatee_is_method(i.id, delegation.id, i.span),
},
AssocItemKind::MacCall(..) | AssocItemKind::DelegationMac(..) => {
panic!("macros should have been expanded by now")
Expand Down Expand Up @@ -1000,7 +1000,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
hir::AssocItemKind::Fn { has_self: sig.decl.has_self() }
}
AssocItemKind::Delegation(box delegation) => hir::AssocItemKind::Fn {
has_self: self.delegation_has_self(i.id, delegation.id, i.span),
has_self: self.delegatee_is_method(i.id, delegation.id, i.span),
},
AssocItemKind::MacCall(..) | AssocItemKind::DelegationMac(..) => {
panic!("macros should have been expanded by now")
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_ast_lowering/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#![feature(if_let_guard)]
#![feature(let_chains)]
#![feature(rustdoc_internals)]
#![warn(unreachable_pub)]
// tidy-alphabetical-end

use std::sync::Arc;
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_ast_passes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,3 @@ rustc_session = { path = "../rustc_session" }
rustc_span = { path = "../rustc_span" }
thin-vec = "0.2.12"
# tidy-alphabetical-end

[lints]
workspace = true
1 change: 1 addition & 0 deletions compiler/rustc_ast_passes/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#![feature(iter_is_partitioned)]
#![feature(let_chains)]
#![feature(rustdoc_internals)]
#![warn(unreachable_pub)]
// tidy-alphabetical-end

pub mod ast_validation;
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_ast_pretty/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,3 @@ rustc_lexer = { path = "../rustc_lexer" }
rustc_span = { path = "../rustc_span" }
thin-vec = "0.2.12"
# tidy-alphabetical-end

[lints]
workspace = true
1 change: 1 addition & 0 deletions compiler/rustc_ast_pretty/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#![doc(rust_logo)]
#![feature(box_patterns)]
#![feature(rustdoc_internals)]
#![warn(unreachable_pub)]
// tidy-alphabetical-end

mod helpers;
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_attr_data_structures/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,3 @@ rustc_serialize = {path = "../rustc_serialize"}
rustc_span = {path = "../rustc_span"}
thin-vec = "0.2.12"
# tidy-alphabetical-end

[lints]
workspace = true
1 change: 1 addition & 0 deletions compiler/rustc_attr_data_structures/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#![doc(rust_logo)]
#![feature(let_chains)]
#![feature(rustdoc_internals)]
#![warn(unreachable_pub)]
// tidy-alphabetical-end

mod attributes;
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_attr_parsing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,3 @@ rustc_session = { path = "../rustc_session" }
rustc_span = { path = "../rustc_span" }
thin-vec = "0.2.12"
# tidy-alphabetical-end

[lints]
workspace = true
1 change: 1 addition & 0 deletions compiler/rustc_attr_parsing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
#![doc(rust_logo)]
#![feature(let_chains)]
#![feature(rustdoc_internals)]
#![warn(unreachable_pub)]
// tidy-alphabetical-end

#[macro_use]
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_baked_icu_data/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,3 @@ icu_locid_transform = "1.3.2"
icu_provider = { version = "1.2", features = ["sync"] }
zerovec = "0.10.0"
# tidy-alphabetical-end

[lints]
workspace = true
2 changes: 1 addition & 1 deletion compiler/rustc_baked_icu_data/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
// tidy-alphabetical-start
#![allow(elided_lifetimes_in_paths)]
#![allow(internal_features)]
#![allow(unreachable_pub)] // because this crate is mostly generated code
#![doc(rust_logo)]
#![feature(rustdoc_internals)]
// #![warn(unreachable_pub)] // don't use because this crate is mostly generated code
// tidy-alphabetical-end

mod data {
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_borrowck/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,3 @@ rustc_traits = { path = "../rustc_traits" }
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
tracing = "0.1"
# tidy-alphabetical-end

[lints]
workspace = true
1 change: 1 addition & 0 deletions compiler/rustc_borrowck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#![feature(rustdoc_internals)]
#![feature(stmt_expr_attributes)]
#![feature(try_blocks)]
#![warn(unreachable_pub)]
// tidy-alphabetical-end

use std::borrow::Cow;
Expand Down
7 changes: 4 additions & 3 deletions compiler/rustc_builtin_macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name = "rustc_builtin_macros"
version = "0.0.0"
edition = "2024"


[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(llvm_enzyme)'] }

[lib]
doctest = false

Expand Down Expand Up @@ -30,6 +34,3 @@ smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
thin-vec = "0.2.12"
tracing = "0.1"
# tidy-alphabetical-end

[lints]
workspace = true
1 change: 1 addition & 0 deletions compiler/rustc_builtin_macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#![feature(rustdoc_internals)]
#![feature(string_from_utf8_lossy_owned)]
#![feature(try_blocks)]
#![warn(unreachable_pub)]
// tidy-alphabetical-end

extern crate proc_macro;
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_codegen_llvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,3 @@ serde_json = "1"
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
tracing = "0.1"
# tidy-alphabetical-end

[lints]
workspace = true
1 change: 1 addition & 0 deletions compiler/rustc_codegen_llvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#![feature(rustdoc_internals)]
#![feature(slice_as_array)]
#![feature(try_blocks)]
#![warn(unreachable_pub)]
// tidy-alphabetical-end

use std::any::Any;
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_codegen_ssa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,3 @@ features = ["read_core", "elf", "macho", "pe", "xcoff", "unaligned", "archive",
[target.'cfg(windows)'.dependencies.windows]
version = "0.59.0"
features = ["Win32_Globalization"]

[lints]
workspace = true
1 change: 1 addition & 0 deletions compiler/rustc_codegen_ssa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#![feature(rustdoc_internals)]
#![feature(trait_alias)]
#![feature(try_blocks)]
#![warn(unreachable_pub)]
// tidy-alphabetical-end

//! This crate contains codegen code that is used by all codegen backends (LLVM and others).
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_const_eval/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,3 @@ rustc_trait_selection = { path = "../rustc_trait_selection" }
rustc_type_ir = { path = "../rustc_type_ir" }
tracing = "0.1"
# tidy-alphabetical-end

[lints]
workspace = true
1 change: 1 addition & 0 deletions compiler/rustc_const_eval/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#![feature(unqualified_local_imports)]
#![feature(yeet_expr)]
#![warn(unqualified_local_imports)]
#![warn(unreachable_pub)]
// tidy-alphabetical-end

pub mod check_consts;
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_data_structures/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,3 @@ memmap2 = "0.2.1"

[target.'cfg(not(target_has_atomic = "64"))'.dependencies]
portable-atomic = "1.5.1"

[lints]
workspace = true
4 changes: 2 additions & 2 deletions compiler/rustc_data_structures/src/graph/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ use std::cmp::max;
use super::*;
use crate::fx::FxHashMap;

pub(super) struct TestGraph {
pub struct TestGraph {
num_nodes: usize,
start_node: usize,
successors: FxHashMap<usize, Vec<usize>>,
predecessors: FxHashMap<usize, Vec<usize>>,
}

impl TestGraph {
pub(super) fn new(start_node: usize, edges: &[(usize, usize)]) -> Self {
pub fn new(start_node: usize, edges: &[(usize, usize)]) -> Self {
let mut graph = TestGraph {
num_nodes: start_node + 1,
start_node,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ pub struct Error<O, E> {

mod helper {
use super::*;
pub(super) type ObligationTreeIdGenerator = impl Iterator<Item = ObligationTreeId>;
pub type ObligationTreeIdGenerator = impl Iterator<Item = ObligationTreeId>;
impl<O: ForestObligation> ObligationForest<O> {
pub fn new() -> ObligationForest<O> {
ObligationForest {
Expand Down
Loading
Loading