summary refs log tree commit diff
path: root/compiler/rustc_resolve/src/late.rs
AgeCommit message (Collapse)AuthorLines
2020-11-13Auto merge of #78826 - petrochenkov:mrscopes2, r=eddybbors-1/+1
resolve: Collapse `macro_rules` scope chains on the fly Otherwise they grow too long and you have to endlessly walk through them when resolving macros or imports. Addresses https://rust-lang.zulipchat.com/#narrow/stream/247081-t-compiler.2Fperformance/topic/Slow.20Builtin.20Derives/near/215750815
2020-11-11Implement destructuring assignment for structs and slicesFabian Zaiser-3/+1
Co-authored-by: varkor <github@varkor.com>
2020-11-07resolve: Collapse `macro_rules` scope chains on the flyVadim Petrochenkov-1/+1
2020-11-01Auto merge of #78420 - estebank:suggest-assoc-fn, r=petrochenkovbors-16/+8
Suggest calling associated `fn` inside `trait`s When calling a function that doesn't exist inside of a trait's associated `fn`, and another associated `fn` in that trait has that name, suggest calling it with the appropriate fully-qualified path. Expand the label to be more descriptive. Prompted by the following user experience: https://users.rust-lang.org/t/cannot-find-function/50663
2020-10-30Fix even more clippy warningsJoshua Nelson-40/+17
2020-10-26Suggest calling associated `fn` inside `trait`sEsteban Küber-16/+8
When calling a function that doesn't exist inside of a trait's associated `fn`, and another associated `fn` in that trait has that name, suggest calling it with the appropriate fully-qualified path. Expand the label to be more descriptive. Prompted by the following user experience: https://users.rust-lang.org/t/cannot-find-function/50663
2020-10-22min_const_generics: allow ty param in repeat exprBastian Kauschke-18/+70
2020-10-17Suggest correct place to add `self` parameter when inside closureJan Verbeek-3/+5
It would incorrectly suggest adding it as a parameter to the closure instead of the containing function.
2020-10-09Add docstringEsteban Küber-0/+2
2020-10-09Given `<T as Trait>::A: Ty` suggest `T: Trait<A = Ty>`Esteban Küber-0/+11
Fix #75829
2020-10-09Point out why a trait is expected on `Struct + 'lt`Esteban Küber-0/+7
2020-09-18use matches!() macro for simple if let conditionsMatthias Krüger-1/+1
2020-09-13allow concrete self types in constsBastian Kauschke-2/+5
2020-09-11Auto merge of #76499 - guswynn:priv_des, r=petrochenkovbors-11/+19
Give better diagnostic when using a private tuple struct constructor Fixes #75907 Some notes: 1. This required some deep changes, including removing a Copy impl for PatKind. If some tests fail, I would still appreciate review on the overall approach 2. this only works with basic patterns (no wildcards for example), and fails if there is any problems getting the visibility of the fields (i am not sure what the failure that can happen in resolve_visibility_speculative, but we check the length of our fields in both cases against each other, so if anything goes wrong, we fall back to the worse error. This could be extended to more patterns 3. this does not yet deal with #75906, but I believe it will be similar 4. let me know if you want more tests 5. doesn't yet at the suggestion that `@yoshuawuyts` suggested at the end of their issue, but that could be added relatively easily (i believe)
2020-09-11Give better diagnostic when using a private tuple struct constructorGus Wynn-11/+19
2020-09-10Attach `TokenStream` to `ast::Path`Aaron Hill-1/+1
2020-08-30Suggest `if let x = y` when encountering `if x = y`Esteban Küber-1/+6
Detect potential cases where `if let` was meant but `let` was left out. Fix #44990.
2020-08-30mv compiler to compiler/mark-0/+2379