about summary refs log tree commit diff
path: root/tests/ui/extern-flag
AgeCommit message (Collapse)AuthorLines
2025-08-14resolve prelude import at `build_reduced_graph` phaseLorrensP-2158466-1/+4
2025-06-24Fix function signature for rust_eh_personalitybjorn3-1/+9
While cg_llvm is very lax about mismatched function signatures, cg_clif will crash when there is any mismatch. It could be turned into an error, but without Cranelift changes can't just be ignored.
2025-04-13UI tests: migrate remaining compile time `error-pattern`s to line annotationsVadim Petrochenkov-1/+1
when possible.
2025-04-03compiletest: Require `//~` annotations even if `error-pattern` is specifiedVadim Petrochenkov-6/+14
2025-02-21Inject `compiler_builtins` during postprocessing rather than via ASTTrevor Gross-7/+1
`compiler_builtins` is currently injected as `extern crate compiler_builtins as _`. This has made gating via diagnostics difficult because it appears in the crate graph as a non-private dependency, and there isn't an easy way to differentiate between the injected AST and user-specified `extern crate compiler_builtins`. Resolve this by injecting `compiler_builtins` during postprocessing rather than early in the AST. Most of the time this isn't even needed because it shows up in `std` or `core`'s crate graph, but injection is still needed to ensure `#![no_core]` works correctly. A similar change was attempted at [1] but this encountered errors building `proc_macro` and `rustc-std-workspace-std`. Similar failures showed up while working on this patch, which were traced back to `compiler_builtins` showing up in the graph twice (once via dependency and once via injection). This is resolved by not injecting if a `#![compiler_builtins]` crate already exists. [1]: https://github.com/rust-lang/rust/pull/113634
2025-02-03Check Sizedness of return type in WFMichael Goulet-0/+4
2025-01-24Reword "crate not found" resolve messageEsteban Küber-4/+8
``` error[E0432]: unresolved import `some_novel_crate` --> file.rs:1:5 | 1 | use some_novel_crate::Type; | ^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `some_novel_crate` ``` On resolve errors where there might be a missing crate, mention `cargo add foo`: ``` error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nope` --> $DIR/conflicting-impl-with-err.rs:4:11 | LL | impl From<nope::Thing> for Error { | ^^^^ use of unresolved module or unlinked crate `nope` | = help: if you wanted to use a crate named `nope`, use `cargo add nope` to add it to your `Cargo.toml` ```
2024-11-14Include the "unwind" crate to link with libunwind instead of the "libc" crate.Xing Xue-9/+5
2024-06-11Rollup merge of #125913 - fmease:early-lints-spruce-up-some-diags, r=Nadrieril许杰友 Jieyou Xu (Joe)-2/+3
Spruce up the diagnostics of some early lints Implement the various "*(note to myself) in a follow-up PR we should turn parts of this message into a subdiagnostic (help msg or even struct sugg)*" drive-by comments I left in #124417 during my review. For context, before #124417, only a few early lints touched/decorated/customized their diagnostic because the former API made it a bit awkward. Likely because of that, things that should've been subdiagnostics were just crammed into the primary message. This PR rectifies this.
2024-06-06Revert "Rollup merge of #124976 - petrochenkov:usedcrates, r=oli-obk"Rémy Rakic-1/+8
This reverts commit eda4a35f365535af72118118a3597edf5a13c12d, reversing changes made to eb6b35b5bcb3c2a594cb29cd478aeb2893f49d30.
2024-06-03Spruce up the diagnostics of some early lintsLeón Orell Valerian Liehr-2/+3
2024-05-22rustc: Use `tcx.used_crates(())` moreVadim Petrochenkov-8/+1
And explain when it should be used.
2024-04-18Add an exception for windows-msvcBen Kimock-0/+9
2024-04-17Remove libc from more testsBen Kimock-7/+0
2024-02-18resolve: Scale back unloading of speculatively loaded cratesVadim Petrochenkov-1/+8
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-50/+50
2024-02-06resolve: Unload speculatively resolved crates before freezing cstoreVadim Petrochenkov-7/+2
2024-01-10Stop mentioning internal lang items in no_std binary errorsNilstrieb-3/+3
When writing a no_std binary, you'll be greeted with nonsensical errors mentioning lang items like eh_personality and start. That's pretty bad because it makes you think that you need to define them somewhere! But oh no, now you're getting the `internal_features` lint telling you that you shouldn't use them! But you need a no_std binary! What now? No problem! Writing a no_std binary is super easy. Just use panic=abort and supply your own platform specific entrypoint symbol (like `main`) and you're good to go. Would be nice if the compiler told you that, right? This makes it so that it does do that.
2023-11-24Show number in error message even for one errorNilstrieb-4/+4
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-09-20Validate crate name in CLI option --externLeón Orell Valerian Liehr-0/+26
2023-05-05add "force" option to --externMatt Hammerly-0/+47
2023-01-11Move /src/test to /testsAlbert Larsan-0/+136