| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Use arenas to avoid Lrc in queries #1
Based on https://github.com/rust-lang/rust/pull/59536.
|
|
|
|
|
|
Here, ExprKind::Use(P<Expr>) tweaks the drop order to act the
same way as '{ let _tmp = expr; _tmp }' does.
|
|
|
|
[wg-async-await] Drop `async fn` arguments in async block
Fixes #54716.
This PR modifies the HIR lowering (and some other places to make this work) so that unused arguments to a async function are always dropped inside the async move block and not at the end of the function body.
```
async fn foo(<pattern>: <type>) {
async move {
}
} // <-- dropped as you "exit" the fn
// ...becomes...
fn foo(__arg0: <ty>) {
async move {
let <pattern>: <ty> = __arg0;
} // <-- dropped as you "exit" the async block
}
```
However, the exact ordering of drops is not the same as a regular function, [as visible in this playground example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2015&gist=be39af1a58e5d430be1eb3c722cb1ec3) - I believe this to be an unrelated issue. There is a [Zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/187312-t-compiler.2Fwg-async-await/topic/.2354716.20drop.20order) for this.
r? @cramertj
cc @nikomatsakis
|
|
|
|
This commit introduces an `ArgSource` enum that is lowered into the HIR
so that diagnostics can correctly refer to the argument pattern's
original name rather than the generated pattern.
|
|
|
|
Refactor Adjust and CastKind
fixes rust-lang#59588
|
|
|
|
include mode in unused binding suggestion span
Fixes #54180.
|
|
Continue evaluating after missing main
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
async fn now lowers directly to an existential type declaration
rather than reusing the `impl Trait` return type lowering.
As part of this, it lowers all argument-position elided lifetimes
using the in-band-lifetimes machinery, creating fresh parameter
names for each of them, using each lifetime parameter as a generic
argument to the generated existential type.
This doesn't currently successfully allow multiple
argument-position elided lifetimes since `existential type`
doesn't yet support multiple lifetimes where neither outlive
the other. This requires a separate fix.
|
|
|
|
Visit `ImplItem` in `dead_code` lint
Fixes https://github.com/rust-lang/rust/issues/47131.
|
|
|
|
Type dependent defs wrappers
First of all, forgive me if something would seem lame to you or I offend some rule (although I tried to read through docs), this is my first PR.
Issue: https://github.com/rust-lang/rust/issues/59094
This PR adds 3 helper methods to `TypeckTables`:
* `opt_type_dependent_def`
* `opt_type_dependent_def_id`
* `type_dependent_def_id`
I didn't add `type_dependent_def` as was proposed in the issue simply because it wasn't used anywhere in the code. Only non-option wrapped`type_dependent_defs()[]` accesses were found in clippy which always called `def_id()` on result.
Speaking of clippy, should I open separate PR in its own repo, given it's used as submodule here?
Sry it took me so long, as I said I'm new here and I had tough week :).
|
|
HirIdify hir::ItemId
Version of https://github.com/rust-lang/rust/pull/59092.
r? @oli-obk
|
|
|
|
replace redundant note in deprecation warning
|
|
|
|
Make meta-item API compatible with `LocalInternedString::get` soundness fix
r? @Zoxc
|
|
|
|
This commit moves the `DefId` field of `Def::Ctor` to be the first
field.
|
|
This commit moves the definition of `CtorOf` from `rustc::hir` to
`rustc::hir::def` and adds imports wherever it is used.
|
|
|
|
|
|
This commit makes two changes - separating the `NodeId` that identifies
an enum variant from the `NodeId` that identifies the variant's
constructor; and no longer creating a `NodeId` for `Struct`-style enum
variants and structs.
Separation of the variant id and variant constructor id will allow the
rest of RFC 2008 to be implemented by lowering the visibility of the
variant's constructor without lowering the visbility of the variant
itself.
No longer creating a `NodeId` for `Struct`-style enum variants and
structs mostly simplifies logic as previously this `NodeId` wasn't used.
There were various cases where the `NodeId` wouldn't be used unless
there was an unit or tuple struct or enum variant but not all uses of
this `NodeId` had that condition, by removing this `NodeId`, this must
be explicitly dealt with. This change mostly applied cleanly, but there
were one or two cases in name resolution and one case in type check
where the existing logic required a id for `Struct`-style enum variants
and structs.
|
|
middle: replace NodeId with HirId in AccessLevels
Pushing the limits of HirIdification (#57578).
Replaces `NodeId` with `HirId` in `middle::privacy::AccessLevels`. Actually this time I was more successful and cracked it; I probably tried to HirIdify too much at once when I attempted it last time ^^.
r? @Zoxc
|
|
Hide deprecation warnings inside derive expansions
Fixes #58822
|
|
|
|
|
|
|
|
Suggest return lifetime when there's only one named lifetime
Fix #29094.
|
|
|
|
|
|
|
|
|
|
|
|
Use derive macro for HashStable
Blocked on https://github.com/rust-lang/rust/pull/56795
|
|
|
|
|