mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-04 06:56:14 +00:00 
			
		
		
		
	By naming them in `[workspace.lints.rust]` in the top-level
`Cargo.toml`, and then making all `compiler/` crates inherit them with
`[lints] workspace = true`. (I omitted `rustc_codegen_{cranelift,gcc}`,
because they're a bit different.)
The advantages of this over the current approach:
- It uses a standard Cargo feature, rather than special handling in
  bootstrap. So, easier to understand, and less likely to get
  accidentally broken in the future.
- It works for proc macro crates.
It's a shame it doesn't work for rustc-specific lints, as the comments
explain.
		
	
			
		
			
				
	
	
		
			20 lines
		
	
	
		
			400 B
		
	
	
	
		
			TOML
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			400 B
		
	
	
	
		
			TOML
		
	
	
	
	
	
[package]
 | 
						|
name = "rustc_llvm"
 | 
						|
version = "0.0.0"
 | 
						|
edition = "2024"
 | 
						|
 | 
						|
[dependencies]
 | 
						|
# tidy-alphabetical-start
 | 
						|
libc = "0.2.73"
 | 
						|
# tidy-alphabetical-end
 | 
						|
 | 
						|
[build-dependencies]
 | 
						|
# tidy-alphabetical-start
 | 
						|
# Pinned so `cargo update` bumps don't cause breakage. Please also update the
 | 
						|
# pinned `cc` in `rustc_codegen_ssa` if you update `cc` here.
 | 
						|
cc = "=1.2.16"
 | 
						|
# tidy-alphabetical-end
 | 
						|
 | 
						|
[lints]
 | 
						|
workspace = true
 |