| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
As an unstable print request.
|
|
`--emit mir`, `#[rustc_symbol_name]` and `#[rustc_def_path]` now run
before codegen and thus work even if codegen fails. This can help with
debugging.
|
|
|
|
It's very useful. There are some false positives involving integration
tests in `rustc_pattern_analysis` and `rustc_serialize`. There is also a
false positive involving `rustc_driver_impl`'s
`rustc_randomized_layouts` feature. And I removed a `rustc_span` mention
in a doc comment in `rustc_log` because it wasn't integral to the
comment but caused a dev-dependency.
|
|
Use `strip_{prefix|suffix}` instead of `{starts|ends}_with`+indexing
Randomly scratching an itch 😁
|
|
|
|
`{AllTargetSpecsJson,TargetSpecJson}`
To correspond to their actual print request names, `target-spec-json`
and `all-target-specs-json`, and for consistency with other print name
<-> print kind mappings.
|
|
Rollup of 12 pull requests
Successful merges:
- #134076 (Stabilize `std::io::ErrorKind::InvalidFilename`)
- #137504 (Move methods from Map to TyCtxt, part 4.)
- #138175 (Support rmeta inputs for --crate-type=bin --emit=obj)
- #138259 (Disentangle `ForwardGenericParamBan` and `ConstParamTy` ribs)
- #138280 (fix ICE in pretty-printing `global_asm!`)
- #138318 (Rustdoc: remove a bunch of `@ts-expect-error` from main.js)
- #138331 (Use `RUSTC_LINT_FLAGS` more)
- #138357 (merge `TypeChecker` and `TypeVerifier`)
- #138394 (remove unnecessary variant)
- #138403 (Delegation: one more ICE fix for `MethodCall` generation)
- #138407 (Delegation: reject C-variadics)
- #138409 (Use sa_sigaction instead of sa_union.__su_sigaction for AIX)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Rollup of 7 pull requests
Successful merges:
- #137314 (change definitely unproductive cycles to error)
- #137701 (Convert `ShardedHashMap` to use `hashbrown::HashTable`)
- #138269 (uefi: fs: Implement FileType, FilePermissions and FileAttr)
- #138331 (Use `RUSTC_LINT_FLAGS` more)
- #138345 (Some autodiff cleanups)
- #138387 (intrinsics: remove unnecessary leading underscore from argument names)
- #138390 (fix incorrect tracing log)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
r=onur-ozkan,jieyouxu
Use `RUSTC_LINT_FLAGS` more
An alternative to the failed #138084.
Fixes #138106.
r? `````@jieyouxu`````
|
|
Continuing the work from #137350.
Removes the unused methods: `expect_variant`, `expect_field`,
`expect_foreign_item`.
Every method gains a `hir_` prefix.
|
|
It's no longer necessary now that `-Wunreachable_pub` is being passed.
|
|
Revert <https://github.com/rust-lang/rust/pull/138084> to buy time to
consider options that avoids breaking downstream usages of cargo on
distributed `rustc-src` artifacts, where such cargo invocations fail due
to inability to inherit `lints` from workspace root manifest's
`workspace.lints` (this is only valid for the source rust-lang/rust
workspace, but not really the distributed `rustc-src` artifacts).
This breakage was reported in
<https://github.com/rust-lang/rust/issues/138304>.
This reverts commit 48caf81484b50dca5a5cebb614899a3df81ca898, reversing
changes made to c6662879b27f5161e95f39395e3c9513a7b97028.
|
|
(Except for `rustc_codegen_cranelift`.)
It's no longer necessary now that `unreachable_pub` is in the workspace
lints.
|
|
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.
|
|
This is temporarily needed for `x doc compiler` to work. They can be
removed once the `Nonterminal` is removed (#124141).
|
|
|
|
Install more signal stack trace handlers
This PR install the signal stack handler to more signals (`SIGILL`, ~~`SIGTRAP`~~, ~~`SIGABRT`~~, ~~`SIGFPE`~~, `SIGBUS`, ~~`SIGQUIT`~~).
Noticed in https://github.com/rust-lang/rust/issues/137138 that we didn't print anything for `SIGILL`, so I though we could just handle more signals.
r? `````@workingjubilee````` since you last touched it
|
|
Continuing the work started in #136466.
Every method gains a `hir_` prefix, though for the ones that already
have a `par_` or `try_par_` prefix I added the `hir_` after that.
|
|
|
|
It's a trivial wrapper around the `hir_crate` query with a small number
of uses.
|
|
The end goal is to eliminate `Map` altogether.
I added a `hir_` prefix to all of them, that seemed simplest. The
exceptions are `module_items` which became `hir_module_free_items` because
there was already a `hir_module_items`, and `items` which became
`hir_free_items` for consistency with `hir_module_free_items`.
|
|
|
|
Directly map each ExternAbi variant to its string and back again.
This has a few advantages:
- By making the ABIs compare equal to their strings, we can easily
lexicographically sort them and use that sorted slice at runtime.
- We no longer need a workaround to make sure the hashes remain stable,
as they already naturally are (by being the hashes of unique strings).
- The compiler can carry around less &str wide pointers
|
|
|
|
Couple of minor cleanups to the diagnostic infrastructure
|
|
|
|
|
|
patterns
|
|
Couple of cleanups to DiagCtxt and EarlyDiagCtxt
|
|
All callers of EarlyDiagCtxt::early_error now emit a fatal error.
|
|
|
|
They were downgraded from queries in #123995 but they can just be
vanilla functions because they are not called in `rustc_middle`.
|
|
|
|
Get rid of RunCompiler
The various `set_*` methods that have been removed can be replaced by setting the respective fields in the `Callbacks::config` implementation. `set_using_internal_features` was often forgotten and it's equivalent is now done automatically.
|
|
It has become nothing other than a wrapper around run_compiler.
|
|
They can both be set inside the config callback too.
|
|
|
|
Properly note when query stack is being cut off
cc #70953
also, i'm not certain whether we should even limit this at all. i don't see the problem with printing the full query stack, apparently it was limited b/c we used to ICE? but we're already printing the full stack to disk since #108714.
r? oli-obk
|
|
|
|
Respect --sysroot for rustc -vV and -Cpasses=list
This is necessary when the specified codegen backend is in a custom sysroot.
Fixes https://github.com/rust-lang/rust/issues/135165
|
|
|
|
Setting up the argument parser to parse no arguments is a tiny bit of wasted
work, but avoids an otherwise-unnecessary special case.
In particular, this lets us avoid having to deal with multiple different APIs
to determine whether the compiler is nightly or not.
|
|
|
|
This is necessary when the specified codegen backend is in a custom
sysroot.
|
|
inline_threshold mark deprecated
no-stack-check
print deprecation message for -Car too
inline_threshold deprecated and do nothing: make in untracked
make OptionDesc struct from tuple
|
|
Remove allowing static_mut_refs lint
|
|
when running `tests/ui/panics/default-backtrace-ice.rs locally it gave this error:
```
failures:
---- [ui] tests/ui/panics/default-backtrace-ice.rs stdout ----
Saved the actual stderr to "/home/jyn/src/rust3/build/x86_64-unknown-linux-gnu/test/ui/panics/default-backtrace-ice/default-backtrace-ice.stderr"
diff of stderr:
7
8 aborting due to `-Z treat-err-as-bug=1`
9 stack backtrace:
- (end_short_backtrace)
- (begin_short_backtrace)
- (end_short_backtrace)
- (begin_short_backtrace)
+ [... omitted 22 frames ...]
+
```
this is a regression from setting RUST_BACKTRACE=1 by default. we need to turn off the new behavior when running UI tests so that they reflect our dist compiler. normally that's done by checking `sess.unstable_opts.ui_testing`, but this happens extremely early in the compiler before we've expanded arg files. do an extremely simple hack that doesn't work in all cases - we don't need it to work in all cases, only when running UI tests.
|