-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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 5 pull requests #65964
Rollup of 5 pull requests #65964
Commits on Oct 26, 2019
-
Update comments re type parameter hack in object safety
To check if a method's receiver type is object safe, we create a new receiver type by substituting in a bogus type parameter (let's call it `U`) for `Self`, and checking that the unmodified receiver type implements `DispatchFromDyn<receiver type with Self = U>`. It would be better to use `dyn Trait` directly, and the only reason we don't is because it triggers another check that `Trait` is object safe, resulting in a query cycle. Once the feature `object_safe_for_dispatch` (tracking issue rust-lang#43561) is stabilized, this will no longer be the case, and we'll be able to use `dyn Trait` as the unsized `Self` type. I've updated the comments in object_safety.rs accordingly.
Configuration menu - View commit details
-
Copy full SHA for fb4095d - Browse repository at this point
Copy the full SHA fb4095dView commit details
Commits on Oct 28, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 58b67c8 - Browse repository at this point
Copy the full SHA 58b67c8View commit details
Commits on Oct 29, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 08ca236 - Browse repository at this point
Copy the full SHA 08ca236View commit details
Commits on Oct 30, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 1a8677a - Browse repository at this point
Copy the full SHA 1a8677aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 39c5b07 - Browse repository at this point
Copy the full SHA 39c5b07View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ffdc3b - Browse repository at this point
Copy the full SHA 9ffdc3bView commit details -
Configuration menu - View commit details
-
Copy full SHA for cf75e6e - Browse repository at this point
Copy the full SHA cf75e6eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4c8544b - Browse repository at this point
Copy the full SHA 4c8544bView commit details -
Configuration menu - View commit details
-
Copy full SHA for d6c9391 - Browse repository at this point
Copy the full SHA d6c9391View commit details -
syntax: use distinct FloatTy from rustc_target.
We also sever syntax's dependency on rustc_target as a result. This should slightly improve pipe-lining. Moreover, some cleanup is done in related code.
Configuration menu - View commit details
-
Copy full SHA for 0d15968 - Browse repository at this point
Copy the full SHA 0d15968View commit details -
Rollup merge of rust-lang#65112 - jack-t:type-parens-lint, r=varkor
Add lint and tests for unnecessary parens around types This is my first contribution to the Rust project, so I apologize if I'm not doing things the right way. The PR fixes rust-lang#64169. It adds a lint and tests for unnecessary parentheses around types. I've run `tidy` and `rustfmt` — I'm not totally sure it worked right, though — and I've tried to follow the instructions linked in the readme. I tried to think through all the variants of `ast::TyKind` to find exceptions to this lint, and I could only find the one mentioned in the original issue, which concerns types with `dyn`. I'm not a Rust expert, thought, so I may well be missing something. There's also a problem with getting this to build. The new lint catches several things in the, e.g., `core`. Because `x.py` seems to build with an equivalent of `-Werror`, what would have been warnings cause the build to break. I got it to build and the tests to pass with `--warnings warn` on my `x.py build` and `x.py test` commands.
Configuration menu - View commit details
-
Copy full SHA for 5272df0 - Browse repository at this point
Copy the full SHA 5272df0View commit details -
Rollup merge of rust-lang#65850 - mikeyhew:patch-1, r=nikomatsakis
Update comments re type parameter hack in object safety To check if a method's receiver type is object safe, we create a new receiver type by substituting in a bogus type parameter (let's call it `U`) for `Self`, and checking that the unmodified receiver type implements `DispatchFromDyn<receiver type with Self = U>`. It would be better to use `dyn Trait` directly, and the only reason we don't is because it triggers another check that `Trait` is object safe, resulting in a query cycle. Once the feature `object_safe_for_dispatch` (tracking issue rust-lang#43561) is stabilized, this will no longer be the case, and we'll be able to use `dyn Trait` as the unsized `Self` type. I've updated the comments in object_safety.rs accordingly. cc @Centril @nikomatsakis @bovinebuddha
Configuration menu - View commit details
-
Copy full SHA for edd869d - Browse repository at this point
Copy the full SHA edd869dView commit details -
Rollup merge of rust-lang#65884 - Centril:non-hardcoded-abis, r=petro…
…chenkov syntax: ABI-oblivious grammar This PR has the following effects: 1. `extern $lit` is now legal where `$lit:literal` and `$lit` is substituted for a string literal. 2. `extern "abi_that_does_not_exist"` is now *syntactically* legal whereas before, the set of ABI strings was hard-coded into the grammar of the language. With this PR, the set of ABIs are instead validated and translated during lowering. That seems more appropriate. 3. `ast::FloatTy` is now distinct from `rustc_target::abi::FloatTy`. The former is used substantially more and the translation between them is only necessary in a single place. 4. As a result of 2-3, libsyntax no longer depends on librustc_target, which should improve pipe-lining somewhat. cc @rust-lang/lang -- the points 1-2 slightly change the definition of the language but in a way which seems consistent with our general principles (in particular wrt. the discussions of turning things into semantic errors). I expect this to be uncontroversial but it's worth letting y'all know. :) r? @varkor
Configuration menu - View commit details
-
Copy full SHA for d79fb1f - Browse repository at this point
Copy the full SHA d79fb1fView commit details -
Rollup merge of rust-lang#65914 - estebank:type-alias-bounds-sugg, r=…
…davidtwco Use structured suggestion for unnecessary bounds in type aliases
Configuration menu - View commit details
-
Copy full SHA for 07c6ee6 - Browse repository at this point
Copy the full SHA 07c6ee6View commit details -
Rollup merge of rust-lang#65959 - vext01:immediate-docstring, r=david…
…twco Fix an incorrect docstring for Immediate in librustc_mir/interpret. I suspect `Immediate` was once called `Value`?
Configuration menu - View commit details
-
Copy full SHA for 1aa1a9c - Browse repository at this point
Copy the full SHA 1aa1a9cView commit details