mirror of
				https://github.com/astral-sh/ruff.git
				synced 2025-11-04 05:34:54 +00:00 
			
		
		
		
	| 
				 
		
			Some checks are pending
		
		
	 
	CI / Determine changes (push) Waiting to run 
				
			CI / cargo fmt (push) Waiting to run 
				
			CI / cargo clippy (push) Blocked by required conditions 
				
			CI / cargo test (linux) (push) Blocked by required conditions 
				
			CI / cargo test (linux, release) (push) Blocked by required conditions 
				
			CI / cargo test (windows) (push) Blocked by required conditions 
				
			CI / cargo test (wasm) (push) Blocked by required conditions 
				
			CI / cargo build (release) (push) Waiting to run 
				
			CI / cargo build (msrv) (push) Blocked by required conditions 
				
			CI / cargo fuzz build (push) Blocked by required conditions 
				
			CI / fuzz parser (push) Blocked by required conditions 
				
			CI / test scripts (push) Blocked by required conditions 
				
			CI / ecosystem (push) Blocked by required conditions 
				
			CI / Fuzz for new ty panics (push) Blocked by required conditions 
				
			CI / cargo shear (push) Blocked by required conditions 
				
			CI / python package (push) Waiting to run 
				
			CI / pre-commit (push) Waiting to run 
				
			CI / mkdocs (push) Waiting to run 
				
			CI / formatter instabilities and black similarity (push) Blocked by required conditions 
				
			CI / test ruff-lsp (push) Blocked by required conditions 
				
			CI / check playground (push) Blocked by required conditions 
				
			CI / benchmarks-instrumented (push) Blocked by required conditions 
				
			CI / benchmarks-walltime (push) Blocked by required conditions 
				
			Summary
--
This PR unifies the remaining differences between `OldDiagnostic` and
`Message` (`OldDiagnostic` was only missing an optional `noqa_offset`
field) and
replaces `Message` with `OldDiagnostic`.
The biggest functional difference is that the combined `OldDiagnostic`
kind no
longer implements `AsRule` for an infallible conversion to `Rule`. This
was
pretty easy to work around with `is_some_and` and `is_none_or` in the
few places
it was needed. In `LintContext::report_diagnostic_if_enabled` we can
just use
the new `Violation::rule` method, which takes care of most cases.
Most of the interesting changes are in [this
range](
		
	
					 | 
			||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||