Commit Graph

137714 Commits

Author SHA1 Message Date
Yuki Okushi
bb6d1d3086
Rollup merge of #81284 - jyn514:impl-times, r=wesleywiser
Make `-Z time-passes` less noisy

- Add the module name to `pre_AST_expansion_passes` and don't make it a
  verbose event (since it normally doesn't take very long, and it's
  emitted many times)
- Don't make the following rustdoc events verbose; they're emitted many times.
  + build_extern_trait_impl
  + build_local_trait_impl
  + build_primitive_trait_impl
  + get_auto_trait_impls
  + get_blanket_trait_impls
- Remove the `get_auto_trait_and_blanket_synthetic_impls` rustdoc event; it's wholly
  covered by get_{auto,blanket}_trait_impls and not very useful.

I found this while working on https://github.com/rust-lang/rust/pull/81275 but it's independent of those changes.
2021-01-28 15:09:10 +09:00
Yuki Okushi
299ff49667 Rollup merge of #81277 - flip1995:from_diag_items, r=matthewjasper
Make more traits of the From/Into family diagnostic items

Following traits are now diagnostic items:
- `From` (unchanged)
- `Into`
- `TryFrom`
- `TryInto`

This also adds symbols for those items:
- `into_trait`
- `try_from_trait`
- `try_into_trait`

Related: https://github.com/rust-lang/rust-clippy/pull/6620#discussion_r562482587
2021-01-28 15:09:08 +09:00
Yuki Okushi
70be5cef69
Rollup merge of #81277 - flip1995:from_diag_items, r=matthewjasper
Make more traits of the From/Into family diagnostic items

Following traits are now diagnostic items:
- `From` (unchanged)
- `Into`
- `TryFrom`
- `TryInto`

This also adds symbols for those items:
- `into_trait`
- `try_from_trait`
- `try_into_trait`

Related: https://github.com/rust-lang/rust-clippy/pull/6620#discussion_r562482587
2021-01-28 15:09:08 +09:00
Yuki Okushi
84ad95be70
Rollup merge of #81062 - sexxi-goose:precise_capture_diagnostics, r=nikomatsakis
Improve diagnostics for Precise Capture

This is just the capture analysis part and borrow checker logging will updated as part of rust-lang/project-rfc-2229#8

Closes rust-lang/project-rfc-2229#22
2021-01-28 15:09:06 +09:00
Yuki Okushi
98226638fd
Rollup merge of #80868 - johanngan:should-panic-msg-with-expected, r=m-ou-se
Print failure message on all tests that should panic, but don't

Fixes #80861. Tests with the `#[should_panic]` attribute should always print a failure message if no panic occurs, regardless of whether or not an `expected` panic message is specified.
2021-01-28 15:09:04 +09:00
Yuki Okushi
7bd3d6ce22 Rollup merge of #79951 - LeSeulArtichaut:ty-ir, r=nikomatsakis
Refractor a few more types to `rustc_type_ir`

In the continuation of #79169, ~~blocked on that PR~~.

This PR:
 - moves `IntVarValue`, `FloatVarValue`, `InferTy` (and friends) and `Variance`
 - creates the `IntTy`, `UintTy` and `FloatTy` enums in `rustc_type_ir`, based on their `ast` and `chalk_ir` equilavents, and uses them for types in the rest of the compiler.

~~I will split up that commit to make this easier to review and to have a better commit history.~~
EDIT: done, I split the PR in commits of 200-ish lines each

r? `````@nikomatsakis````` cc `````@jackh726`````
2021-01-28 15:09:02 +09:00
Yuki Okushi
446edd1e1a
Rollup merge of #79951 - LeSeulArtichaut:ty-ir, r=nikomatsakis
Refractor a few more types to `rustc_type_ir`

In the continuation of #79169, ~~blocked on that PR~~.

This PR:
 - moves `IntVarValue`, `FloatVarValue`, `InferTy` (and friends) and `Variance`
 - creates the `IntTy`, `UintTy` and `FloatTy` enums in `rustc_type_ir`, based on their `ast` and `chalk_ir` equilavents, and uses them for types in the rest of the compiler.

~~I will split up that commit to make this easier to review and to have a better commit history.~~
EDIT: done, I split the PR in commits of 200-ish lines each

r? `````@nikomatsakis````` cc `````@jackh726`````
2021-01-28 15:09:02 +09:00
Yuki Okushi
025a850d21
Rollup merge of #70904 - LukasKalbertodt:stabilize-seek-convenience, r=m-ou-se
Stabilize `Seek::stream_position` (feature `seek_convenience`)

Tracking issue: #59359

Unresolved questions from tracking issue:
- "Override `stream_len` for `File`?" → we can do that in the future, this does not block stabilization.
- "Rename to `len` and `position`?" → as noted in the tracking issue, both of these shorter names have problems (`len` is usually a cheap getter, `position` clashes with `Cursor`). I do think the current names are perfectly fine.
- "Rename `stream_position` to `tell`?" → as mentioned in [the comment bringing this up](https://github.com/rust-lang/rust/issues/59359#issuecomment-559541545), `stream_position` is more descriptive. I don't think `tell` would be a good name.

What remains to decide, is whether or not adding these methods is worth it.
2021-01-28 15:09:00 +09:00
Camelid
cd8dceef86 rustdoc: Render HRTB correctly for bare functions
The angle brackets were not rendered, so code like this:

    some_func: for<'a> fn(val: &'a i32) -> i32

would be rendered as:

    some_func: fn'a(val: &'a i32) -> i32

However, rendering with angle brackets is still invalid syntax:

    some_func: fn<'a>(val: &'a i32) -> i32

so now it renders correctly as:

    some_func: for<'a> fn(val: &'a i32) -> i32

-----

However, note that this code:

    some_trait: dyn for<'a> Trait<'a>

will still render as:

    some_trait: dyn Trait<'a>

which is not invalid syntax, but is still unclear. Unfortunately I think
it's hard to fix that case because there isn't enough information in the
`rustdoc::clean::Type` that this code operates on. Perhaps that case can
be fixed in a later PR.
2021-01-27 19:55:46 -08:00
Kasper
74f26a1e62 Fix rustdoc page title text selection 2021-01-28 04:42:27 +01:00
bors
e32f372c42 Auto merge of #81414 - rylev:fetch-rmeta-crates, r=petrochenkov
Check for rmeta crates when getting existing crates from cache

This change makes sure to check for rmeta files when resolving crates instead of always going to disk in that case.
2021-01-28 01:29:47 +00:00
Tomasz Miąsko
dc6ec3596b Avoid memory allocation when removing dead blocks
Use `reachable_as_bitset` to reuse a bitset from the traversal rather
than allocating it seprately. Additionally check if there are any
unreachable blocks before proceeding.
2021-01-28 00:00:00 +00:00
Rune Tynan
67b78a0271
Update crate name and add README 2021-01-27 18:58:44 -05:00
Rune Tynan
3076e255fe
src/etc/json-types -> src/rustdoc-json-types 2021-01-27 18:58:43 -05:00
Rune Tynan
cca4eea6f9
Simplify conversion 2021-01-27 18:58:40 -05:00
Rune Tynan
3c2806957e
Move into src/etc 2021-01-27 18:57:14 -05:00
Rune Tynan
28f6cab498
Allow rustc::default_hash_types in the offending statement 2021-01-27 18:57:14 -05:00
Rune Tynan
428bc149b5
Update cargo.lock 2021-01-27 18:57:13 -05:00
Rune Tynan
c689b97fba
Split JSON into separately versioned crate 2021-01-27 18:56:57 -05:00
Amanieu d'Antras
530723036a Bump LLVM submodule 2021-01-27 23:08:54 +00:00
Amanieu d'Antras
69e6326564 Add new aarch64 targets to platform-support.md 2021-01-27 23:08:54 +00:00
Amanieu d'Antras
8783d1a47e Add big-endian and ILP32 AArch64 targets 2021-01-27 22:47:57 +00:00
Amanieu d'Antras
a112c4d61d Support AArch64 big-endian and ILP32 in compiletest 2021-01-27 22:47:57 +00:00
Amanieu d'Antras
06f14df43b Support AArch64 ILP32 in libunwind bindings 2021-01-27 22:47:57 +00:00
Amanieu d'Antras
d53b0a04a6 Fix ARM and AArch64 calling convention for passing small composite types
On big-endian the values need to be right-aligned within a 64-bit register, as if the value had been read with a 64-bit load instruction.
2021-01-27 22:47:56 +00:00
Amanieu d'Antras
8afe59893a Add big-endian support for AArch64 va_arg 2021-01-27 22:47:56 +00:00
jumbatm
a1a7830465 Use symbol interning to avoid string alloc. 2021-01-28 08:03:36 +10:00
bors
a2f8f62818 Auto merge of #81335 - thomwiggers:no-panic-shrink-to, r=Mark-Simulacrum
Trying to shrink_to greater than capacity should be no-op

Per the discussion in https://github.com/rust-lang/rust/issues/56431, `shrink_to` shouldn't panic if you try to make a vector shrink to a capacity greater than its current capacity.
2021-01-27 18:36:32 +00:00
Eric Huss
45484ec197 Update cargo 2021-01-27 09:56:34 -08:00
Tomasz Miąsko
20982b386f Inline MemPlace::offset 2021-01-27 16:13:58 +01:00
Tomasz Miąsko
83dc7fe669 Inline trivial implementation of rustc_target::abi::Align 2021-01-27 16:13:18 +01:00
Ellen
ab421a1762 fix tidy errors 2021-01-27 15:09:17 +00:00
Ellen
f4261772d8 comments 2021-01-27 14:46:43 +00:00
Bastian Kauschke
b519deb224 const_evaluatable: stop looking into type aliases 2021-01-27 13:34:45 +01:00
Bastian Kauschke
582a17101d add const_evaluatable_checked test 2021-01-27 13:19:35 +01:00
bors
613ef740f3 Auto merge of #80987 - GuillaumeGomez:remove-cache-key, r=jyn514
Remove CACHE_KEY global

We realized in https://github.com/rust-lang/rust/pull/80914 that the cache handling (through a global) needed to be updated to make it much easier to handle.

r? `@jyn514`
2021-01-27 10:19:51 +00:00
bjorn3
268d7bc459 Remove fn_sig_for_fn_abi 2021-01-27 10:36:40 +01:00
bjorn3
e564a0ad31 Rustfmt 2021-01-27 10:33:06 +01:00
bjorn3
aa23f862dc Remove vararg support check
This check wasn't very useful and removing it simplifies the code.
2021-01-27 10:32:56 +01:00
bjorn3
d263447878 Replace EmptySinglePair with SmallVec 2021-01-27 10:24:31 +01:00
Guillaume Gomez
d78e1ed623 Fix clean/types doc links 2021-01-27 10:05:06 +01:00
Guillaume Gomez
5f22b30ca6 Add search index test for primitive types 2021-01-27 10:05:06 +01:00
Guillaume Gomez
cac238e4a3 More cleanup 2021-01-27 10:05:06 +01:00
Guillaume Gomez
9a64180f0d Unify cache usage and improve naming 2021-01-27 10:05:06 +01:00
Guillaume Gomez
522f48cb3f Improve documentation on GetDefId trait's methods 2021-01-27 10:05:06 +01:00
Guillaume Gomez
d98a72c77b Update to new rustdoc APIs 2021-01-27 10:05:06 +01:00
Guillaume Gomez
6a36b3f49d Apply review comments and improve code 2021-01-27 10:05:05 +01:00
Guillaume Gomez
19630ead41 Remove cache usage wherever possible 2021-01-27 10:05:05 +01:00
Guillaume Gomez
c448270099 Use empty Cache for methods requiring it when filling Cache itself 2021-01-27 10:05:05 +01:00
Guillaume Gomez
9fd5a67984 Remove CACHE_KEY global 2021-01-27 10:05:05 +01:00