-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Comparing changes
Open a pull request
base repository: rust-lang/rust
base: 51b0b3734
head repository: rust-lang/rust
compare: e6072a7b3
- 16 commits
- 41 files changed
- 6 contributors
Commits on Jan 7, 2018
-
type error method suggestions use whitelisted identity-like conversions
Previously, on a type mismatch (and if this wasn't preëmpted by a higher-priority suggestion), we would look for argumentless methods returning the expected type, and list them in a `help` note. This had two major shortcomings. Firstly, a lot of the suggestions didn't really make sense (if you used a &str where a String was expected, `.to_ascii_uppercase()` is probably not the solution you were hoping for). Secondly, we weren't generating suggestions from the most useful traits! We address the first problem with an internal `#[rustc_conversion_suggestion]` attribute meant to mark methods that keep the "same value" in the relevant sense, just converting the type. We address the second problem by making `FnCtxt.probe_for_return_type` pass the `ProbeScope::AllTraits` to `probe_op`: this would seem to be safe because grep reveals no other callers of `probe_for_return_type`. Also, structured suggestions are preferred (because they're pretty, but also for RLS and friends). Also also, we make the E0055 autoderef recursion limit error use the one-time-diagnostics set, because we can potentially hit the limit a lot during probing. (Without this, test/ui/did_you_mean/recursion_limit_deref.rs would report "aborting due to 51 errors"). Unfortunately, the trait probing is still not all one would hope for: at a minimum, we don't know how to rule out `into()` in cases where it wouldn't actually work, and we don't know how to rule in `.to_owned()` where it would. Issues #46459 and #46460 have been filed and are ref'd in a FIXME. This is hoped to resolve #42929, #44672, and #45777.
Configuration menu - View commit details
-
Copy full SHA for aba56dd - Browse repository at this point
Copy the full SHA aba56ddView commit details -
Remove deprecated unstable attribute
#[simd]
The `#[simd]` attribute has been deprecated since c8b6d5b back in 2015. Any nightly crates using it have had ample time to switch to `#[repr(simd)]`, and if they didn't they're likely broken by now anyway.
Robin Kruppe committedJan 7, 2018 Configuration menu - View commit details
-
Copy full SHA for 95c3fc0 - Browse repository at this point
Copy the full SHA 95c3fc0View commit details
Commits on Jan 8, 2018
-
struct
pattern parsing and diagnostic tweaks- Recover from struct parse error on match and point out missing match body. - Point at struct when finding non-identifier while parsing its fields. - Add label to "expected identifier, found {}" error.
Configuration menu - View commit details
-
Copy full SHA for d17e38f - Browse repository at this point
Copy the full SHA d17e38fView commit details -
Use different DefIndex representation that is better suited for varia…
…ble length integer encodings.
Configuration menu - View commit details
-
Copy full SHA for c9d25e3 - Browse repository at this point
Copy the full SHA c9d25e3View commit details
Commits on Jan 12, 2018
-
Re-implement ```bash CFG_LIBDIR_RELATIVE=`echo ${CFG_LIBDIR} | cut -c$((${#CFG_PREFIX}+${CAT_INC}))-` ``` from old `configure` script.
Configuration menu - View commit details
-
Copy full SHA for ee8b578 - Browse repository at this point
Copy the full SHA ee8b578View commit details -
Configuration menu - View commit details
-
Copy full SHA for 27b4f22 - Browse repository at this point
Copy the full SHA 27b4f22View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f5110e - Browse repository at this point
Copy the full SHA 0f5110eView commit details -
Configuration menu - View commit details
-
Copy full SHA for c87a108 - Browse repository at this point
Copy the full SHA c87a108View commit details -
Configuration menu - View commit details
-
Copy full SHA for f05282f - Browse repository at this point
Copy the full SHA f05282fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 83e76d6 - Browse repository at this point
Copy the full SHA 83e76d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 472f4e1 - Browse repository at this point
Copy the full SHA 472f4e1View commit details
Commits on Jan 13, 2018
-
Auto merge of #46461 - zackmdavis:elemental_method_suggestion_jambore…
…e, r=estebank type error method suggestions use whitelisted identity-like conversions  Previously, on a type mismatch (and if this wasn't preëmpted by a higher-priority suggestion), we would look for argumentless methods returning the expected type, and list them in a `help` note. This had two major shortcomings: firstly, a lot of the suggestions didn't really make sense (if you used a &str where a String was expected, `.to_ascii_uppercase()` is probably not the solution you were hoping for). Secondly, we weren't generating suggestions from the most useful traits! We address the first problem with an internal `#[rustc_conversion_suggestion]` attribute meant to mark methods that keep the "same value" in the relevant sense, just converting the type. We address the second problem by making `FnCtxt.probe_for_return_type` pass the `ProbeScope::AllTraits` to `probe_op`: this would seem to be safe because grep reveals no other callers of `probe_for_return_type`. Also, structured suggestions are pretty and good for RLS and friends. Unfortunately, the trait probing is still not all one would hope for: at a minimum, we don't know how to rule out `into()` in cases where it wouldn't actually work, and we don't know how to rule in `.to_owned()` where it would. Issues #46459 and #46460 have been filed and are ref'd in a FIXME. This is hoped to resolve #42929, #44672, and #45777.
Configuration menu - View commit details
-
Copy full SHA for 6eff103 - Browse repository at this point
Copy the full SHA 6eff103View commit details -
Auto merge of #46592 - o01eg:fix-45345, r=alexcrichton
Fix 45345 There is a fix for #45345 It re-introduces `CFG_LIBDIR_RELATIVE` which was broken when migration from `configure` script to `x.py`. Other commits fix errors which happen after rustbuild cleanups.
Configuration menu - View commit details
-
Copy full SHA for 6cf081c - Browse repository at this point
Copy the full SHA 6cf081cView commit details -
Auto merge of #47181 - michaelwoerister:var-len-def-index, r=eddyb
Use DefIndex encoding that works better with on-disk variable length integer representations. Use the least instead of the most significant bit for representing the address space. r? @eddyb
Configuration menu - View commit details
-
Copy full SHA for ca09293 - Browse repository at this point
Copy the full SHA ca09293View commit details -
Auto merge of #47242 - estebank:issue-15980, r=petrochenkov
`struct` pattern parsing and diagnostic tweaks - Recover from struct parse error on match and point out missing match body. - Point at struct when finding non-identifier while parsing its fields. - Add label to "expected identifier, found {}" error. Fix #15980.
Configuration menu - View commit details
-
Copy full SHA for 9b2f8ac - Browse repository at this point
Copy the full SHA 9b2f8acView commit details -
Configuration menu - View commit details
-
Copy full SHA for e6072a7 - Browse repository at this point
Copy the full SHA e6072a7View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 51b0b3734...e6072a7b3