| Age | Commit message (Collapse) | Author | Lines |
|
compiletest normalization: preserve non-JSON lines such as ICEs
Currently, every non-JSON line from stderr gets normalized away when compiletest normalizes the output. In particular, ICEs get normalized to the empty output. That does not seem desirable, so this changes normalization to preserve non-JSON lines instead.
Also see https://github.com/laumann/compiletest-rs/issues/169: because of that bug, Miri currently *looks* green in the toolstate, but some tests ICE. That same bug is likely no longer present in latest compiletest because the error code gets checked separately, but it still seems like a good idea to also make sure that ICEs are considered stderr output:
This change found an accidental user-visible `error!` in CTFE validation (fixed), and a non-deterministic panic when there are two `main` symbols (not fixed, no idea where this comes from). Both got missed before because non-JSON output got ignored.
|
|
|
|
include mode in unused binding suggestion span
Fixes #54180.
|
|
rustdoc: use --static-root-path for settings.js
At the time i was writing https://github.com/rust-lang/docs.rs/pull/332, i noticed that the `settings.js` file that was being loaded was not being loaded from the `--static-root-path`. This PR fixes that so that users on docs.rs can effectively cache this file.
|
|
Continue evaluating after missing main
|
|
|
|
|
|
rustdoc: Remove default keyword from re-exported trait methods
Fixes #59977
r? @QuietMisdreavus
As this fixes a stable to beta regression, could it be backported?
|
|
Add must_use annotations to Result::is_ok and is_err
Discussed in #59610
|
|
|
|
|
|
|
|
|
|
Properly parse '--extern-private' with name and path
It turns out that https://github.com/rust-lang/rust/pull/57586 didn't properly parse `--extern-private name=path`.
This PR properly implements the `--extern-private` option. I've added a new `extern-private` option to `compiletest`, which causes an `--extern-private` option to be passed to the compiler with the proper path.
Part of https://github.com/rust-lang/rust/issues/44663
|
|
Fix cross-crate visibility of fictive variant constructors
After merging https://github.com/rust-lang/rust/pull/59376 I realized that the code in the decoder wasn't entirely correct - we "decoded" fictive variant constructors with their variant's visibility, which could be public, rather than demoted to `pub(crate)`.
Fictive constructors are not directly usable in expression/patterns, but the effect still can be observed with imports.
r? @davidtwco
|
|
Remove duplicated redundant spans
Fix #59895.
|
|
HirIdify hir::Def
cc @ljedrz
r? @oli-obk
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Improvement for comparision against fn
I try to add error message.
related: https://github.com/rust-lang/rust/issues/59488
|
|
|
|
Rollup of 6 pull requests
Successful merges:
- #59776 (Apply resource-suffix to search-index and source-files scripts as well)
- #59784 (Suggest importing macros from the crate root)
- #59812 (Exclude profiler-generated symbols from MSVC __imp_-symbol workaround.)
- #59874 (Clean up handling of `-Z pgo-gen` commandline option.)
- #59890 (Don't generate empty json variables)
- #59911 (Revert "compile crates under test w/ -Zemit-stack-sizes")
Failed merges:
r? @ghost
|
|
Clean up handling of `-Z pgo-gen` commandline option.
This PR adapts the `-Z pgo-gen` flag to how Clang and GCC handle the corresponding `-fprofile-generate` flag. In particular, the flag now optionally takes a directory to place the profiling data in and allows to omit the argument (instead of having to pass an empty string).
|
|
Exclude profiler-generated symbols from MSVC __imp_-symbol workaround.
LLVM's profiling instrumentation adds a few symbols that are used by the profiler runtime. Since these show up as globals in the LLVM IR, the compiler generates `dllimport`-related `__imp_` stubs for them. This can lead to linker errors because the instrumentation symbols have weak linkage or are in a comdat section, but the `__imp_` stubs aren't.
Instead of trying to replicate the linkage/comdat setup for the stubs, this PR just excludes the profiler-related symbols from stub-generation since they aren't supposed to be referenced via `__declspec(dllimport)` anywhere anyway.
r? @alexcrichton
EDIT: I considered making this more general, i.e. inferring from the symbol name if it is a Rust symbol or not. But then I figured out that that would yield false negatives for `#[no_mangle]` et al, so I went with a blacklist approach.
|
|
Suggest importing macros from the crate root
Fixes #59764.
r? @estebank
cc @varkor
|
|
In `-Zprint-type-size` output, sort enum variants by size.
It's useful to see the biggest variants first.
r? @pnkfelix
|
|
Make duplicate matcher bindings a hard error
r? @Centril
Closes #57742
|
|
Re-export NonZero signed variant in std
Closes #59834 .
|
|
Mark variables captured by reference as mutable correctly
Closes #59620
r? @pnkfelix
|
|
Stabilize the `alloc` crate.
This implements RFC 2480:
* https://github.com/rust-lang/rfcs/pull/2480
* https://github.com/rust-lang/rfcs/blob/master/text/2480-liballoc.md
Closes https://github.com/rust-lang/rust/issues/27783
|
|
Rollup of 8 pull requests
Successful merges:
- #59781 (Remove check_match from const_eval)
- #59820 (proc_macro: stop using LEB128 for RPC.)
- #59846 (clarify what the item is in "not a module" error)
- #59847 (Error when using `catch` after `try`)
- #59859 (Suggest removing `?` to resolve type errors.)
- #59862 (Tweak unstable diagnostic output)
- #59866 (Recover from missing semicolon based on the found token)
- #59892 (Impl RawFd conversion traits for WASI TcpListener, TcpStream and UdpSocket)
Failed merges:
r? @ghost
|
|
|
|
Recover from missing semicolon based on the found token
When encountering one of a few keywords when a semicolon was
expected, suggest the semicolon and recover:
```
error: expected one of `.`, `;`, `?`, or an operator, found `let`
--> $DIR/recover-missing-semi.rs:4:5
|
LL | let _: usize = ()
| - help: missing semicolon here
LL |
LL | let _ = 3;
| ^^^
error[E0308]: mismatched types
--> $DIR/recover-missing-semi.rs:2:20
|
LL | let _: usize = ()
| ^^ expected usize, found ()
|
= note: expected type `usize`
found type `()`
```
|
|
Tweak unstable diagnostic output
|
|
Suggest removing `?` to resolve type errors.
Fixes #59756.
|
|
Error when using `catch` after `try`
Part of https://github.com/rust-lang/rust/issues/31436
|
|
clarify what the item is in "not a module" error
The motivation here was that I was trying to import an associated constant when I thought it was an enum variant, and got confused by this error.
Ideally I would like to add a note saying that associated constants, types, and methods cannot be imported, but I'm not sure that the associated items for a `Def` can be checked at resolve time.
|
|
Remove check_match from const_eval
This fixes #59378.
It seems that the `check_match` may be unnecessary, so this removes it per instructions provided in the issue. I re-ran the tests for `librustc_mir` and everything seemed fine!
|
|
This implements RFC 2480:
* https://github.com/rust-lang/rfcs/pull/2480
* https://github.com/rust-lang/rfcs/blob/master/text/2480-liballoc.md
Closes https://github.com/rust-lang/rust/issues/27783
|
|
Final (one can only hope) futures_api adjustments
Based on https://github.com/rust-lang/rust/pull/59119 -- this change is only the latter two commits.
cc https://github.com/rust-lang/rust/issues/59725
r? @withoutboats
|
|
|
|
Rollup of 15 pull requests
Successful merges:
- #59680 (Document the -Z flag to the rustc book)
- #59711 (Add back the substring test)
- #59806 (compiletest: Improve no_prefer_dynamic docs)
- #59809 (Make trait_methods_not_found use a lock)
- #59811 (Kill dead code dominator code.)
- #59814 (Fix broken links on std::boxed doc page)
- #59821 (improve unknown enum variant errors)
- #59831 (Remove strange formatting in `Ordering` docs.)
- #59836 (std::ops::Div examples: correct nominator to numerator)
- #59857 (SGX target: fix cfg(test) build)
- #59876 (Update TRPL to use mdbook 0.2)
- #59880 (Remove note about transmute for float bitpatterns.)
- #59889 (Update diagnostics.rs)
- #59891 (Fix the link to sort_by_cached_key)
- #59894 (save-analysis: Pull associated type definition using `qpath_def`)
Failed merges:
r? @ghost
|
|
improve unknown enum variant errors
Fixes #56517.
|