summary refs log tree commit diff
path: root/compiler/rustc_resolve/src/late
AgeCommit message (Collapse)AuthorLines
2020-10-02resolve: prohibit anon const non-static lifetimesDavid Wood-0/+33
This commit modifies name resolution to emit an error when non-static lifetimes are used in anonymous constants when the `min_const_generics` feature is enabled. Signed-off-by: David Wood <david@davidtw.co>
2020-09-17use strip_prefix over starts_with and manual slicing based on pattern length ↵Matthias Krüger-2/+2
(clippy::manual_strip)
2020-09-15fix a couple of stylistic clippy warningsMatthias Krüger-1/+1
namely: clippy::redundant_pattern_matching clippy::redundant_pattern clippy::search_is_some clippy::filter_next clippy::into_iter_on_ref clippy::clone_on_copy clippy::needless_return
2020-09-11Auto merge of #76499 - guswynn:priv_des, r=petrochenkovbors-10/+45
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-10/+45
2020-09-10Attach `TokenStream` to `ast::Path`Aaron Hill-2/+4
2020-09-09remove redundant clonesMatthias Krüger-1/+1
(clippy::redundant_clone)
2020-08-30Suggest `if let x = y` when encountering `if x = y`Esteban Küber-0/+13
Detect potential cases where `if let` was meant but `let` was left out. Fix #44990.
2020-08-30mv compiler to compiler/mark-0/+4458