UI tests: migrate remaining compile time error-patterns to line annotations when possible#139760
Merged
bors merged 1 commit intorust-lang:masterfrom Apr 14, 2025
Merged
UI tests: migrate remaining compile time error-patterns to line annotations when possible#139760bors merged 1 commit intorust-lang:masterfrom
error-patterns to line annotations when possible#139760bors merged 1 commit intorust-lang:masterfrom
Conversation
…otations when possible.
jieyouxu
approved these changes
Apr 14, 2025
Member
jieyouxu
left a comment
There was a problem hiding this comment.
Thanks, individual test diffs look good!
Member
There was a problem hiding this comment.
For myself: this file is (github kindly considered this a binary file)
//@ reference: input.encoding.utf8
//@ dont-require-annotations: ERROR
//~vv ERROR unknown start of token
//~v ERROR expected one of `!` or `::`, found `n`
Member
There was a problem hiding this comment.
For myself: this file is
//@ reference: input.encoding.utf8
//@ dont-require-annotations: ERROR
//~vv ERROR unknown start of token
//~v ERROR expected one of `!` or `::`, found `n`
fn main() {}
Member
|
@bors r+ rollup |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 14, 2025
Rollup of 9 pull requests Successful merges: - rust-lang#138336 (Improve `-Z crate-attr` diagnostics) - rust-lang#139636 (Encode dep node edge count as u32 instead of usize) - rust-lang#139666 (cleanup `mir_borrowck`) - rust-lang#139695 (compiletest: consistently use `camino::{Utf8Path,Utf8PathBuf}` throughout) - rust-lang#139699 (Proactively update coroutine drop shim's phase to account for later passes applied during shim query) - rust-lang#139718 (enforce unsafe attributes in pre-2024 editions by default) - rust-lang#139722 (Move some things to rustc_type_ir) - rust-lang#139760 (UI tests: migrate remaining compile time `error-pattern`s to line annotations when possible) - rust-lang#139776 (Switch attrs to `diagnostic::on_unimplemented`) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 14, 2025
Rollup merge of rust-lang#139760 - petrochenkov:noerrpat2, r=jieyouxu UI tests: migrate remaining compile time `error-pattern`s to line annotations when possible There's a number of cases in which `error-pattern` is still necessary even for compile time checking. - It checks something that compiler writes directly into stderr as text, and not to the structured json output. This includes some stuff reported during compiler panics, and also diagnostics that happen very early, for example when parsing the command line. - It checks something that exists only in the full rendered diagnostic test, but not in its structured components, for example code fragments or output of `-Ztrack-diagnostics`. (The latter can probably be converted to structured form though.) This is continuation of rust-lang#139137. r? `@jieyouxu`
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 4, 2025
compiletest: Support matching on non-json lines in compiler output and migrate most of remaining `error-pattern`s to it. Such diagnostics use a new diagnostic kind `RAW`. Also emit an error for `error-pattern`s that can be replaced with line annotations. Also remove a number of conditions to check both line annotations and `error-pattern`s in more cases. Also respect `//@ check-stdout` when collecting "actual errors" for comparing against line annotations. (A couple of tiny refactorings is also included.) Continuation of rust-lang#139760. r? `@jieyouxu`
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 4, 2025
compiletest: Support matching on non-json lines in compiler output and migrate most of remaining `error-pattern`s to it. Such diagnostics use a new diagnostic kind `RAW`. Also emit an error for `error-pattern`s that can be replaced with line annotations. Also remove a number of conditions to check both line annotations and `error-pattern`s in more cases. Also respect `//@ check-stdout` when collecting "actual errors" for comparing against line annotations. (A couple of tiny refactorings is also included.) Continuation of rust-lang#139760. r? `@jieyouxu`
github-actions bot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this pull request
May 5, 2025
compiletest: Support matching on non-json lines in compiler output and migrate most of remaining `error-pattern`s to it. Such diagnostics use a new diagnostic kind `RAW`. Also emit an error for `error-pattern`s that can be replaced with line annotations. Also remove a number of conditions to check both line annotations and `error-pattern`s in more cases. Also respect `//@ check-stdout` when collecting "actual errors" for comparing against line annotations. (A couple of tiny refactorings is also included.) Continuation of rust-lang/rust#139760. r? `@jieyouxu`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There's a number of cases in which
error-patternis still necessary even for compile time checking.-Ztrack-diagnostics. (The latter can probably be converted to structured form though.)This is continuation of #139137.
r? @jieyouxu