-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 10 pull requests #108052
Rollup of 10 pull requests #108052
Commits on Jan 22, 2023
-
--wip-- [skip ci] get the generic text and put it int he suggestion, but suggestion not working on derive subdiagnostic refactor away from derives and use span_suggestion() instead. Show's the correct(?) generic contents, but overwrites the fn name :( x fmt drop commented code and s/todo/fixme get the correct diagnostic for functions, at least x fmt remove some debugs remove format remove debugs remove useless change remove useless change remove legacy approach correct lookahead + error message contains the ident name fmt refactor code tests add tests remoev debug remove comment
Configuration menu - View commit details
-
Copy full SHA for e813132 - Browse repository at this point
Copy the full SHA e813132View commit details -
Apply automatic suggestions from code review
Co-authored-by: Takayuki Maeda <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5287004 - Browse repository at this point
Copy the full SHA 5287004View commit details -
Configuration menu - View commit details
-
Copy full SHA for 655beb4 - Browse repository at this point
Copy the full SHA 655beb4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4447949 - Browse repository at this point
Copy the full SHA 4447949View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8292d07 - Browse repository at this point
Copy the full SHA 8292d07View commit details
Commits on Jan 31, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 70bfcc2 - Browse repository at this point
Copy the full SHA 70bfcc2View commit details
Commits on Feb 1, 2023
-
Configuration menu - View commit details
-
Copy full SHA for a3d32bb - Browse repository at this point
Copy the full SHA a3d32bbView commit details
Commits on Feb 13, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 44a2388 - Browse repository at this point
Copy the full SHA 44a2388View commit details -
Configuration menu - View commit details
-
Copy full SHA for 873c83b - Browse repository at this point
Copy the full SHA 873c83bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 826bee7 - Browse repository at this point
Copy the full SHA 826bee7View commit details -
Configuration menu - View commit details
-
Copy full SHA for ef6a59b - Browse repository at this point
Copy the full SHA ef6a59bView commit details
Commits on Feb 14, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 3180f1c - Browse repository at this point
Copy the full SHA 3180f1cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 826abcc - Browse repository at this point
Copy the full SHA 826abccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a5a1a8 - Browse repository at this point
Copy the full SHA 2a5a1a8View commit details -
rustdoc: add more tooltips to intra-doc links
This commit makes intra-doc link tooltips consistent with generated links in function signatures and item tables, with the format `itemtype foo::bar::baz`. This way, you can tell if a link points at a trait or a type (for example) by mousing over it. See also fce944d
Configuration menu - View commit details
-
Copy full SHA for ba4b026 - Browse repository at this point
Copy the full SHA ba4b026View commit details -
Configuration menu - View commit details
-
Copy full SHA for 70fd729 - Browse repository at this point
Copy the full SHA 70fd729View commit details -
Configuration menu - View commit details
-
Copy full SHA for 936bf29 - Browse repository at this point
Copy the full SHA 936bf29View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0e185c2 - Browse repository at this point
Copy the full SHA 0e185c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9e2947a - Browse repository at this point
Copy the full SHA 9e2947aView commit details -
Configuration menu - View commit details
-
Copy full SHA for c8dae10 - Browse repository at this point
Copy the full SHA c8dae10View commit details -
Configuration menu - View commit details
-
Copy full SHA for 26136c6 - Browse repository at this point
Copy the full SHA 26136c6View commit details -
Rollup merge of rust-lang#103478 - SpanishPear:spanishpear/issue_1033…
…66_fix, r=TaKO8Ki Suggest fix for misplaced generic params on fn item rust-lang#103366 fixes rust-lang#103366 This still has some work to go, but works for 2/3 of the initial base cases described in #1033366 simple fn: ``` error: expected identifier, found `<` --> shreys/test_1.rs:1:3 | 1 | fn<T> id(x: T) -> T { x } | ^ expected identifier | help: help: place the generic parameter list after the function name: | 1 | fn id<T>(x: T) -> T { x } | ~~~~ ``` Complicated bounds ``` error: expected identifier, found `<` --> spanishpear/test_2.rs:1:3 | 1 | fn<'a, B: 'a + std::ops::Add<Output = u32>> f(_x: B) { } | ^ expected identifier | help: help: place the generic parameter list after the function name: | 1 | fn f<'a, B: 'a + std::ops::Add<Output = u32>>(_x: B) { } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` Opening a draft PR for comments on approach, particularly I have the following questions: - [x] Is it okay to be using `err.span_suggestion` over struct derives? I struggled to get the initial implementation (particularly the correct suggestion message) on struct derives, although I think given what I've learned since starting, I could attempt re-doing it with that approach. - [x] in the case where the snippet cannot be obtained from a span, is the `help` but no suggestion okay? I think yes (also, when does this case occur?) - [x] are there any red flags for the generalisation of this work for relevant item kinds (i.e. `struct`, `enum`, `trait`, and `union`). My basic testing indicates it does work for those types except the help tip is currently hardcoded to `after the function name` - which should change dependent on the item. - [x] I am planning to not show the suggestion if there is already a `<` after the item identifier, (i.e. if there are already generics, as after a function name per the original issue). Any major objections? - [x] Is the style of error okay? I wasn't sure if there was a way to make it display nicer, or if thats handled by span_suggestion These aren't blocking questions, and I will keep working on: - check if there is a `<` after the ident (and if so, not showing the suggestion) - generalize the help message - figuring out how to write/run/etc ui tests (including reading the docs for them) - logic cleanups
Configuration menu - View commit details
-
Copy full SHA for 202c706 - Browse repository at this point
Copy the full SHA 202c706View commit details -
Rollup merge of rust-lang#107739 - spastorino:check-overflow-evaluate…
…_canonical_goal, r=lcnr Check for overflow in evaluate_canonical_goal r? `@lcnr`
Configuration menu - View commit details
-
Copy full SHA for 9ee3c7a - Browse repository at this point
Copy the full SHA 9ee3c7aView commit details -
Rollup merge of rust-lang#108003 - chenyukang:yukang/fix-107998, r=co…
…mpiler-errors Avoid ICE when the generic_span is empty Fixes rust-lang#107998 r? ```@TaKO8Ki```
Configuration menu - View commit details
-
Copy full SHA for 1f486f0 - Browse repository at this point
Copy the full SHA 1f486f0View commit details -
Rollup merge of rust-lang#108016 - tshepang:just-one-example, r=thomcc
"Basic usage" is redundant for there is just one example
Configuration menu - View commit details
-
Copy full SHA for 3eb5731 - Browse repository at this point
Copy the full SHA 3eb5731View commit details -
Rollup merge of rust-lang#108023 - JulianKnodt:smaller_benchmark, r=w…
…orkingjubilee Shrink size of array benchmarks Might've overdone it with the size of these benchmarks, as there's no need for them to be quite as large. Fixes rust-lang#108011
Configuration menu - View commit details
-
Copy full SHA for d599be0 - Browse repository at this point
Copy the full SHA d599be0View commit details -
Rollup merge of rust-lang#108024 - zephaniahong:master, r=jyn514
add message to update Cargo.toml when x is changed `@jyn514` Is this correct? As mentioned in rust-lang#108021
Configuration menu - View commit details
-
Copy full SHA for 43b42c5 - Browse repository at this point
Copy the full SHA 43b42c5View commit details -
Rollup merge of rust-lang#108025 - notriddle:notriddle/intra-doc-link…
…-tooltips, r=GuillaumeGomez rustdoc: add more tooltips to intra-doc links This commit makes intra-doc link tooltips consistent with generated links in function signatures and item tables, with the format `itemtype foo::bar::baz`. This way, you can tell if a link points at a trait or a type (for example) by mousing over it. See also rust-lang#39697 Partially solves https://internals.rust-lang.org/t/rustdoc-suggestion-highlight-links-fn-s-mod-s-type-s-etc-appropriately-within-and-documentation/17931 (though the Internals thread asks for color-coding, while this PR adds a tooltip instead, it's accomplishing the same thing). Before: <img width="950" alt="image" src="https://user-images.githubusercontent.com/1593513/218653059-911cea01-7231-438a-ad98-be98ab73783f.png"> After: <img width="432" alt="image" src="https://user-images.githubusercontent.com/1593513/218653201-34ca3aa7-18f1-4cb1-be68-a1411bbe797e.png">
Configuration menu - View commit details
-
Copy full SHA for 8804e7f - Browse repository at this point
Copy the full SHA 8804e7fView commit details -
Rollup merge of rust-lang#108029 - oli-obk:🞋_usize, r=RalfJung
s/eval_usize/eval_target_usize/ for clarity r? `@nnethercote` as discussed in https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/.60Const.60.20and.20.60usize.60.2F.60u64.60 it is unclear what `usize` means and why we use a `u64` for something talking about `usize`. This renaming should make it clear that we're talking about `usize`s on the target platform, irrespective of the compiler host platform.
Configuration menu - View commit details
-
Copy full SHA for f68864c - Browse repository at this point
Copy the full SHA f68864cView commit details -
Rollup merge of rust-lang#108035 - oli-obk:oli_new_contributor_funkin…
…ess, r=Mark-Simulacrum Avoid using a dead email address as the main email address This caused highfive to welcome me as a new contributor on every PR, because it couldn't find any commits of mine.
Configuration menu - View commit details
-
Copy full SHA for 7a9e6e8 - Browse repository at this point
Copy the full SHA 7a9e6e8View commit details -
Rollup merge of rust-lang#108038 - eggyal:remove_needless_supertrait_…
…constraints, r=lcnr Remove needless supertrait constraints from Interner projections These associated types are already all constrained to implement `Ord`, so specifically requiring its supertraits `Eq`, `PartialEq` and `PartialOrd` is superfluous.
Configuration menu - View commit details
-
Copy full SHA for ea679fb - Browse repository at this point
Copy the full SHA ea679fbView commit details