| Age | Commit message (Collapse) | Author | Lines |
|
HIR docs: mention how to resolve method paths
|
|
Improve uninit/zeroed lint
* Also warn when creating a raw pointer with a NULL vtable.
* Also identify `MaybeUninit::uninit().assume_init()` and `MaybeUninit::zeroed().assume_init()` as dangerous.
|
|
gate rustc_on_unimplemented under rustc_attrs
Move `rustc_on_implemented` from the `on_implemented` gate to `rustc_attrs` as it is internal.
Closes #29628
r? @varkor
|
|
|
|
|
|
`AttrKind` is a new type with two variants, `Normal` and `DocComment`. It's a
big performance win (over 10% in some cases) because `DocComment` lets doc
comments (which are common) be represented very cheaply.
`Attribute` gets some new helper methods to ease the transition:
- `has_name()`: check if the attribute name matches a single `Symbol`; for
`DocComment` variants it succeeds if the symbol is `sym::doc`.
- `is_doc_comment()`: check if it has a `DocComment` kind.
- `{get,unwrap}_normal_item()`: extract the item from a `Normal` variant;
panic otherwise.
Fixes #60935.
|
|
This kind of thing just makes the code harder to read.
|
|
Co-Authored-By: Oliver Scherer <github35764891676564198441@oli-obk.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use American spelling for `pluralize!`
|
|
bump smallvec to 1.0
This includes https://github.com/servo/rust-smallvec/pull/162, fixing an unsoundness in smallvec.
See https://github.com/servo/rust-smallvec/pull/175 for the 1.0 release announcement.
Cc @mbrubeck @emilio
|
|
r=estebank
Rename `LocalInternedString` and more
This PR renames `LocalInternedString` as `SymbolStr`, removes an unnecessary `impl` from it, improves comments, and cleans up some `SymbolStr` uses.
r? @estebank
|
|
rustc: remove "GlobalMetaData" dead code from hir::map::definitions.
Spotted while refactoring uses of `DefIndex` and/or `LocalDefId`.
r? @michaelwoerister
|
|
Fix typo in explanation of `E0080`
Handling issue #66105 in Rust repo.
`evaluate an constant expression` to `evaluate a constant expression`
|
|
Tweak type mismatch caused by break on tail expr
When `break;` has a type mismatch because the `Destination` points at a tail
expression with an obligation flowing from a return type, point at the
return type.
Fix #39968.
|
|
Move has_panic_handler to query
Moves us off of a global Once instead re-querying the lang item each time. The conditions on when we set it to true change a little (previously we'd make sure a few more lang items were `Some`) but I think they in practice don't matter, we won't compile later on if we don't have them.
|
|
Show type parameter name and definition in type mismatch error messages
Fixes #47319
r? estebank
|
|
Remove `PartialEq` and `Eq` from the `SpecialDerives`.
Now that PR #65519 landed, this is the follow-on work of removing `PartialEq` and `Eq` from the set of `SpecialDerives` .
|
|
When `break;` has a type mismatch because the `Destination` points at a tail
expression with an obligation flowing from a return type, point at the
return type.
Fix #39968.
|
|
|
|
|
|
|
|
|
|
`Span` cannot represent `span.hi < span.lo`
So we can remove the corresponding checks from various code
|
|
r=michaelwoerister
De-querify `trivial_dropck_outlives`.
It's sufficiently simple and fast that memoizing it is a slight
pessimization.
r? @michaelwoerister
|
|
rustc_target: rename {Fn,Arg}Type to {Fn,Arg}Abi.
I was trying to tweak the API of `FnType` (now `FnAbi`) and the name kept bothering me.
`FnAbi` is to a function signature a bit like a layout is to a type, so the name still isn't perfect yet, but at least it doesn't have the misleading `Type` in it anymore.
If this can't land I think I can continue my original refactor without it, so I'm not strongly attached to it.
r? @nagisa cc @oli-obk
|
|
Handling issue #66105 in Rust repo.
`evaluate an constant expression` to `evaluate a constant expression`
|
|
|
|
|
|
Remove LintBuffer from Session
This moves the `LintBuffer` from `Session` into the `Resolver`, where it is used until lowering is done and then consumed by early lint passes. This also happily removes the failure mode of buffering lints too late where it would have previously lead to ICEs; it is statically no longer possible to do so.
I suspect that with a bit more work a similar move could be done for the lint buffer inside `ParseSess`, but this PR doesn't touch it (in part to keep itself small).
The last commit is the "interesting" commit -- the ones before it don't work (though they compile) as they sort of prepare the various crates for the lint buffer to be passed in rather than accessed through Session.
|
|
|
|
|
|
This allows us to directly pass in a lint buffer
|
|
|
|
|
|
|
|
|
|
For a single-threaded parallel compiler, this reduces instruction counts
across several benchmarks, by up to 2.8%.
The commit also adds documentation about `Sharded`'s use of `FxHasher`.
|
|
|
|
This allows catch_panic to ignore C++ exceptions.
|
|
Highlight only relevant parts of type path in type errors
Resolves #57413.
Unfortunately the current Rust UI testing setup can't test that the correct colors are being used in a given output, so here's a screenshot of a small test program I wrote:

|