| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Still no break-with-value or labels, but at least we know that `loop { break; }`
doesn't diverge.
|
|
|
|
|
|
|
|
| |
Divergence here means that for some reason, the end of a block will not be
reached. We tried to model this just using the never type, but that doesn't work
fully (e.g. in `let x = { loop {}; "foo" };` x should still have type `&str`);
so this introduces a `diverges` flag that the type checker keeps track of, like
rustc does.
|
|
|
|
| |
They're `&[u8; N]`, not `&[u8]` (see #4374).
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
4305: Favor types for record type struct in name resolution r=matklad a=edwin0cheng
Fixed #4235
Co-authored-by: Edwin Cheng <[email protected]>
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
4283: Support macro for trait items r=matklad a=edwin0cheng
Fixed #4039
r? @flodiebold
Co-authored-by: Edwin Cheng <[email protected]>
Co-authored-by: Edwin Cheng <[email protected]>
|
| | | |
|
| |/ |
|
|/
|
|
| |
Signed-off-by: Benjamin Coenen <[email protected]>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
4234: Support local_inner_macros r=jonas-schievink a=edwin0cheng
This PR implements `#[macro_export(local_inner_macros)]` support.
Note that the rustc implementation is quite [hacky][1] too. :)
[1]: https://github.com/rust-lang/rust/blob/614f273e9388ddd7804d5cbc80b8865068a3744e/src/librustc_resolve/macros.rs#L456
Co-authored-by: Edwin Cheng <[email protected]>
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
This reverts commit a5f2b16366f027ad60c58266a66eb7fbdcbda9f9, reversing
changes made to c96b2180c1c4206a0a98c280b4d30897eb116336.
|
|/ |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
4173: Use core instead of std for builtin derive macros r=edwin0cheng a=edwin0cheng
Fixed #4087.
We can't use `$crate` here right now because :
1. We have to able to detect `macro` 2.0 in collecting phase for finding `rustc_builtin_macro` attrs.
2. And we have to make hygiene works for builtin derive macro.
r= @flodiebold
Co-authored-by: Edwin Cheng <[email protected]>
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
| |
So e.g. if we have `fn foo<T: SomeTrait<u32>>() -> T::Item`, we want to lower
that to `<T as SomeTrait<u32>>::Item` and not `<T as SomeTrait<_>>::Item`.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
4145: Remove dead code r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
|
| | |
|
|/
|
|
| |
Signed-off-by: Benjamin Coenen <[email protected]>
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
4106: Fix wrong substitution code r=matklad a=flodiebold
We need to shift in when we're substituting inside a binder.
This should fix #4053 (it doesn't fix the occasional overflow that also occurs on the Diesel codebase though).
Co-authored-by: Florian Diebold <[email protected]>
|
| |
| |
| |
| |
| |
| |
| | |
We need to shift in when we're substituting inside a binder.
This should fix #4053 (it doesn't fix the occasional overflow that also occurs
on the Diesel codebase though).
|
|/ |
|
|
|
|
| |
This should fix some of the worst performance problems.
|
|
|
|
|
|
|
| |
The root cause was that we forgot to add bindings from the arm to the
guard expression
closes #3980
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
4023: Fix another crash from wrong binders r=matklad a=flodiebold
Basically, if we had something like `dyn Trait<T>` (where `T` is a type parameter) in an impl we lowered that to `dyn Trait<^0.0>`, when it should be `dyn Trait<^1.0>` because the `dyn` introduces a new binder. With one type parameter, that's just wrong, with two, it'll lead to crashes.
Co-authored-by: Florian Diebold <[email protected]>
|
| |
| |
| |
| |
| |
| |
| | |
Basically, if we had something like `dyn Trait<T>` (where `T` is a type
parameter) in an impl we lowered that to `dyn Trait<^0.0>`, when it should be
`dyn Trait<^1.0>` because the `dyn` introduces a new binder. With one type
parameter, that's just wrong, with two, it'll lead to crashes.
|
| |
| |
| |
| |
| |
| |
| | |
Fixes a lot of false type mismatches.
(And as always when touching the unification code, I have to say I'm looking
forward to replacing it by Chalk's...)
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
4012: fix panic on ellipsis in pattern r=flodiebold a=JoshMcguigan
fixes #3999
Co-authored-by: Josh Mcguigan <[email protected]>
|
| |/ |
|
| |
| |
| |
| |
| |
| | |
It's not entirely clear what subnode ranges should mean in the
presence of macros, so let's leave them out for now. We are not using
them heavily anyway.
|
| |
| |
| |
| | |
closes #2799
|
|/ |
|
|\
| |
| |
| |
| |
| |
| |
| | |
3979: fix missing match arm false positive for enum with no variants r=flodiebold a=JoshMcguigan
fixes #3974
Co-authored-by: Josh Mcguigan <[email protected]>
|
| | |
|
| | |
|