Commit graph

4086 commits

Author SHA1 Message Date
Amanieu d'Antras
69cde44390 TODO -> FIXME 2021-02-24 02:36:45 +00:00
Tomasz Miąsko
ef731b31db Use small hash set in mir_inliner_callees
Use small hash set in `mir_inliner_callees` to avoid temporary
allocation when possible and quadratic behaviour for large number of
callees.
2021-02-24 00:00:00 +00:00
Tomasz Miąsko
6d5c0c1bcb Consider inexpensive inlining criteria first
Refactor inlining decisions so that inexpensive criteria are considered first:

1. Based on code generation attributes.
2. Based on MIR availability (examines call graph).
3. Based on MIR body.
2021-02-24 00:00:00 +00:00
klensy
c75c4a579b replaced some map_or with map_or_else 2021-02-24 02:43:35 +03:00
Ellen
42cbfd6346 yeet 2021-02-23 23:35:59 +00:00
klensy
5ff1be197e replaced some unwrap_or with unwrap_or_else 2021-02-23 23:56:04 +03:00
Michael Howell
de6f1b8278 Do not consider using a semicolon inside of a different-crate macro
Fixes #81943
2021-02-23 12:03:44 -07:00
Amanieu d'Antras
d87eec1bf6 Add #[rustc_legacy_const_generics] 2021-02-23 17:25:55 +00:00
bors
fe1bf8e05c Auto merge of #82443 - Dylan-DPC:rollup-yni7uio, r=Dylan-DPC
Rollup of 10 pull requests

Successful merges:

 - #81629 (Point out implicit deref coercions in borrow)
 - #82113 (Improve non_fmt_panic lint.)
 - #82258 (Implement -Z hir-stats for nested foreign items)
 - #82296 (Support `pub` on `macro_rules`)
 - #82297 (Consider auto derefs before warning about write only fields)
 - #82305 (Remove many RefCells from DocContext)
 - #82308 (Lower condition of `if` expression before it's "then" block)
 - #82311 (Jsondocck improvements)
 - #82362 (Fix mir-cfg dumps)
 - #82391 (disable atomic_max/min tests in Miri)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-02-23 17:24:33 +00:00
Dylan DPC
aa1405fff7
Rollup merge of #82362 - osa1:issue81918, r=oli-obk
Fix mir-cfg dumps

Fixes #81918
Fixes #82326 (duplicate)
Fixes #82325

---

r? ``@oli-obk``
2021-02-23 16:10:29 +01:00
Dylan DPC
269f39922b
Rollup merge of #82308 - estebank:issue-82290, r=lcnr
Lower condition of `if` expression before it's "then" block

Fix #82290, fix #82250.
2021-02-23 16:10:27 +01:00
Dylan DPC
9d378b33de
Rollup merge of #82297 - tmiasko:write-only, r=oli-obk
Consider auto derefs before warning about write only fields

Changes from #81473 extended the dead code lint with an ability to detect
fields that are written to but never read from. The implementation skips
over fields on the left hand side of an assignment, without marking them
as live.

A field access might involve an automatic dereference and de-facto read
the field. Conservatively mark expressions with deref adjustments as
live to avoid generating false positive warnings.

Closes #81626.
2021-02-23 16:10:25 +01:00
Dylan DPC
e2561c58a4
Rollup merge of #82296 - spastorino:pubrules, r=nikomatsakis
Support `pub` on `macro_rules`

This rebases and updates `since` version of #78166 from ``@petrochenkov``

r? ``@nikomatsakis``
2021-02-23 16:10:23 +01:00
Dylan DPC
2982ba50fc
Rollup merge of #82258 - tmiasko:foreign-hir-stats, r=davidtwco
Implement -Z hir-stats for nested foreign items

An attempt to compute HIR stats for crates with nested foreign items results in an ICE.

```rust
fn main() {
    extern "C" { fn f(); }
}
```

```
thread 'rustc' panicked at 'visit_nested_xxx must be manually implemented in this visitor'
```

Provide required implementation of visitor method.
2021-02-23 16:10:22 +01:00
Dylan DPC
547b3adfe4
Rollup merge of #82113 - m-ou-se:panic-format-lint, r=estebank
Improve non_fmt_panic lint.

This change:
- fixes the span used by this lint in the case the panic argument is a single macro expansion (e.g. `panic!(a!())`);
- adds a suggestion for `panic!(format!(..))` to remove `format!()` instead of adding `"{}", ` or using `panic_any` like it does now; and
- fixes the incorrect suggestion to replace `panic![123]` by `panic_any(123]`.

Fixes #82109.
Fixes #82110.
Fixes #82111.

Example output:
```
warning: panic message is not a string literal
 --> src/main.rs:8:12
  |
8 |     panic!(format!("error: {}", "oh no"));
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(non_fmt_panic)]` on by default
  = note: this is no longer accepted in Rust 2021
  = note: the panic!() macro supports formatting, so there's no need for the format!() macro here
help: remove the `format!(..)` macro call
  |
8 |     panic!("error: {}", "oh no");
  |           --                  --

```

r? `@estebank`
2021-02-23 16:10:21 +01:00
Dylan DPC
18d1284433
Rollup merge of #81629 - 1000teslas:issue-81365-fix, r=Aaron1011
Point out implicit deref coercions in borrow

Fixes #81365

`@Aaron1011` I'm not sure why my code shows the note even in an implicit `Deref` call. See the output for `issue-81365-8.rs`.
2021-02-23 16:10:20 +01:00
Aaron Hill
46db4bab0b
Skip emitting closure diagnostic when closure_kind_origins has no entry
Fixes #82438

This map is not guarnateed to have an entry for a closure.
2021-02-23 09:46:20 -05:00
bors
0196107543 Auto merge of #82127 - tgnottingham:tune-ahead-of-time-codegen, r=varkor
rustc_codegen_ssa: tune codegen according to available concurrency

This change tunes ahead-of-time codegening according to the amount of
concurrency available, rather than according to the number of CPUs on
the system. This can lower memory usage by reducing the number of
compiled LLVM modules in memory at once, particularly across several
rustc instances.

Previously, each rustc instance would assume that it should codegen
ahead of time to meet the demand of number-of-CPUs workers. But often, a
rustc instance doesn't have nearly that much concurrency available to
it, because the concurrency availability is split, via the jobserver,
across all active rustc instances spawned by the driving cargo process,
and is further limited by the `-j` flag argument. Therefore, each rustc
might have had several times the number of LLVM modules in memory than
it really needed to meet demand. If the modules were large, the effect
on memory usage would be noticeable.

With this change, the required amount of ahead-of-time codegen scales up
with the actual number of workers running within a rustc instance. Note
that the number of workers running can be less than the actual
concurrency available to a rustc instance. However, if more concurrency
is actually available, workers are spun up quickly as job tokens are
acquired, and the ahead-of-time codegen scales up quickly as well.
2021-02-23 14:38:45 +00:00
bors
446d4533e8 Auto merge of #82102 - nagisa:nagisa/fix-dwo-name, r=davidtwco
Set path of the compile unit to the source directory

As part of the effort to implement split dwarf debug info, we ended up
setting the compile unit location to the output directory rather than
the source directory. Furthermore, it seems like we failed to remap the
prefixes for this as well!

The desired behaviour is to instead set the `DW_AT_GNU_dwo_name` to a
path relative to compiler's working directory. This still allows
debuggers to find the split dwarf files, while not changing the
behaviour of the code that is compiling with regular debug info, and not
changing the compiler's behaviour with regards to reproducibility.

Fixes #82074

cc `@alexcrichton` `@davidtwco`
2021-02-23 10:02:16 +00:00
Ömer Sinan Ağacan
fa74d489a2 Improve error msgs when found type is deref of expected
This improves help messages in two cases:

- When expected type is `T` and found type is `&T`, we now look through blocks
  and suggest dereferencing the expression of the block, rather than the whole
  block.

- In the above case, if the expression is an `&`, we not suggest removing the
  `&` instead of adding `*`.

Both of these are demonstrated in the regression test. Before this patch the
first error in the test would be:

    error[E0308]: `if` and `else` have incompatible types
     --> test.rs:8:9
      |
    5 | /     if true {
    6 | |         a
      | |         - expected because of this
    7 | |     } else {
    8 | |         b
      | |         ^ expected `usize`, found `&usize`
    9 | |     };
      | |_____- `if` and `else` have incompatible types
      |
    help: consider dereferencing the borrow
      |
    7 |     } else *{
    8 |         b
    9 |     };
      |

Now:

    error[E0308]: `if` and `else` have incompatible types
     --> test.rs:8:9
      |
    5 | /     if true {
    6 | |         a
      | |         - expected because of this
    7 | |     } else {
    8 | |         b
      | |         ^
      | |         |
      | |         expected `usize`, found `&usize`
      | |         help: consider dereferencing the borrow: `*b`
    9 | |     };
      | |_____- `if` and `else` have incompatible types

The second error:

    error[E0308]: `if` and `else` have incompatible types
      --> test.rs:14:9
       |
    11 | /     if true {
    12 | |         1
       | |         - expected because of this
    13 | |     } else {
    14 | |         &1
       | |         ^^ expected integer, found `&{integer}`
    15 | |     };
       | |_____- `if` and `else` have incompatible types
       |
    help: consider dereferencing the borrow
       |
    13 |     } else *{
    14 |         &1
    15 |     };
       |

now:

    error[E0308]: `if` and `else` have incompatible types
      --> test.rs:14:9
       |
    11 | /     if true {
    12 | |         1
       | |         - expected because of this
    13 | |     } else {
    14 | |         &1
       | |         ^-
       | |         ||
       | |         |help: consider removing the `&`: `1`
       | |         expected integer, found `&{integer}`
    15 | |     };
       | |_____- `if` and `else` have incompatible types

Fixes #82361
2021-02-23 10:50:06 +03:00
bors
cd64446196 Auto merge of #82076 - jyn514:update-bootstrap, r=Mark-Simulacrum
Update the bootstrap compiler

This updates the bootstrap compiler, notably leaving out a change to enable semicolon in macro expressions lint, because stdarch still depends on the old behavior.
2021-02-23 07:19:41 +00:00
Dylan DPC
0e5bca5f51
Rollup merge of #82255 - nhwn:nonzero-err-as-bug, r=davidtwco
Make `treat_err_as_bug` Option<NonZeroUsize>

`rustc -Z treat-err-as-bug=N` already requires `N` to be nonzero when the argument is parsed, so changing the type from `Option<usize>` to `Option<NonZeroUsize>` is a low-hanging fruit in terms of layout optimization.
2021-02-23 02:51:55 +01:00
Dylan DPC
8979fd4237
Rollup merge of #82166 - kaniini:s390x-musl-target, r=nagisa
add s390x-unknown-linux-musl target

This is the first step in bringup for Rust on s390x.

The libc and std crates need modifications as well, but getting this upstream makes that work easier.
2021-02-23 02:51:53 +01:00
Dylan DPC
b8d4354099
Rollup merge of #82128 - anall:feature/add_diagnostic_items, r=davidtwco
add diagnostic items for OsString/PathBuf/Owned as well as to_vec on slice

This is adding diagnostic items to be used by rust-lang/rust-clippy#6730, but my understanding is the clippy-side change does need to be done over there since I am adding a new clippy feature.

Add diagnostic items to the following types:
  OsString (os_string_type)
  PathBuf (path_buf_type)
  Owned (to_owned_trait)

As well as the to_vec method on slice/[T]
2021-02-23 02:51:51 +01:00
Dylan DPC
cc07061190
Rollup merge of #82091 - henryboisdequin:use-place-ref-more, r=RalfJung
use PlaceRef abstractions more consistently

Addresses this [comment](https://github.com/rust-lang/rust/pull/80865/files#r558978715)
Associated issue: #80647

r? ```@RalfJung```
2021-02-23 02:51:50 +01:00
Dylan DPC
5d90e89c36
Rollup merge of #81769 - estebank:tail-expr-as-potential-return, r=lcnr
Suggest `return`ing tail expressions that match return type

Some newcomers are confused by the behavior of tail expressions,
interpreting that "leaving out the `;` makes it the return value".
To help them go in the right direction, suggest using `return` instead
when applicable.
2021-02-23 02:51:46 +01:00
Dylan DPC
8e51bd4315
Rollup merge of #81235 - reese:rw-tuple-diagnostics, r=estebank
Improve suggestion for tuple struct pattern matching errors.

Closes #80174

This change allows numbers to be parsed as field names when pattern matching on structs, which allows us to provide better error messages when tuple structs are matched using a struct pattern.

r? ``@estebank``
2021-02-23 02:51:44 +01:00
Vadim Petrochenkov
fc9d578bc5 expand: Preserve order of inert attributes during expansion 2021-02-23 01:07:22 +03:00
bors
11f838d64a Auto merge of #81978 - tmiasko:head-ctor, r=Mark-Simulacrum
Inline hot part of PatStack::head_ctor

When building rustc with `-Codegen-units=1` this inline hint ensures
that obtaining already initialized head constructor does not involve
a function call overhead and reduces the instruction count in
match-stress-enum-check full benchmark from 11.9G to 9.8G.

It shouldn't have significant impact on the currently default
configuration where it reflects existing inlining decisions.
2021-02-22 21:45:50 +00:00
Simon Vandel Sillesen
a6dccfeb23 New mir-opt pass to simplify gotos with const values
Fixes #77355
2021-02-22 21:03:57 +01:00
Ömer Sinan Ağacan
2145a8770c Fix mir-cfg dumps
Fixes #81918
Fixes #82326 (duplicate)
Fixes #82325
2021-02-22 17:36:30 +03:00
bors
15598a83db Auto merge of #77551 - simonvandel:extend-simplify-branch-same, r=oli-obk
MIR-OPT: Pass to deduplicate blocks

This pass finds basic blocks that are completely equal,
and replaces all uses with just one of them.

```bash
$ RUSTC_LOG=rustc_mir::transform::deduplicate_blocks ./x.py build --stage 2 | grep "SUCCESS: Replacing: " > log
...
$ cat log | wc -l
23875
```
2021-02-22 12:14:23 +00:00
Yuki Okushi
50a2de233a
Rollup merge of #82379 - nagisa:nagisa/hexagon-enums, r=estebank
Fix sizes of repr(C) enums on hexagon

Enums on hexagon use a smallest size (but at least 1 byte) that fits all
the enumeration values. This is unlike many other ABIs where enums are
at least 32 bits.

Fixes #82100
2021-02-22 18:26:13 +09:00
Yuki Okushi
1870b3bac6
Rollup merge of #82367 - matthiaskrgr:wraps, r=petrochenkov
remove redundant option/result wrapping of return values

If a function always returns `Ok(something)`, we can return `something` directly and remove the corresponding error handling in the callers.
clippy::unnecessary_wraps
2021-02-22 18:26:10 +09:00
Yuki Okushi
20c1fa1770
Rollup merge of #82287 - r00ster91:field_name_and, r=petrochenkov
Make "missing field" error message more natural

```rust
struct A {
    x: i32,
    y: i32,
    z: i32,
}

fn main() {
    A { };
}
```
```
error[E0063]: missing fields `x`, `y`, `z` in initializer of `A`
 --> src/main.rs:8:5
  |
8 |     A { };
  |     ^ missing `x`, `y`, `z`
```
This error is now:
```
error[E0063]: missing fields `x`, `y` and `z` in initializer of `A`
 --> src/main.rs:8:5
  |
8 |     A { };
  |     ^ missing `x`, `y` and `z`
```
I thought it looked nicer and more natural this way. Also, if there is >3 fields missing, there is an "and" as well ("missing \`x\`, \`y\`, \`z\` *and* 1 other field"), but for <=3 there is not. As such it improves consistency too.

As for the implementation, originally I ended up with a chunky `push_str` algorithm but then I figured I could just do the formatting manually since it's just 3 field names at maximum. It is comparatively readable.

As a sidenote, one thing I was wondering about is, isn't there more cases where you have a list of things like field names? Maybe this whole thing can at some point later be made into a more general function to be used in multiple areas.
2021-02-22 18:26:07 +09:00
1000teslas
1847a6c0c1 Extract deref coercion explanation into method 2021-02-22 19:08:44 +11:00
Esteban Küber
fc6c19e2dc fix rebase 2021-02-21 23:15:59 -08:00
Esteban Küber
d669882f38 Do not suggest ; if expression is side effect free
When a tail expression isn't unit, we previously always suggested adding
a trailing `;` to turn it into a statement. This suggestion isn't
appropriate for any expression that doesn't have side-effects, as the
user will have likely wanted to call something else or do something with
the resulting value, instead of just discarding it.
2021-02-21 16:34:37 -08:00
Esteban Küber
020edd91a9 reword ; suggestions to have consistent wording 2021-02-21 16:27:29 -08:00
Esteban Küber
796ce9fcb7 Suggest returning tail expressions that match return type
Some newcomers are confused by the behavior of tail expressions,
interpreting that "leaving out the `;` makes it the return value".
To help them go in the right direction, suggest using `return` instead
when applicable.
2021-02-21 16:27:29 -08:00
Simonas Kazlauskas
7130e462ee Fix sizes of repr(C) enums on hexagon
Enums on hexagon use a smallest size (but at least 1 byte) that fits all
the enumeration values. This is unlike many other ABIs where enums are
at least 32 bits.
2021-02-22 01:05:17 +02:00
Simon Vandel Sillesen
2d1e0adfe9 New pass to deduplicate blocks 2021-02-21 21:51:54 +01:00
Simon Vandel Sillesen
1e865709a6 Make MatchBranchSimplification clean up after itself 2021-02-21 21:22:04 +01:00
Simon Vandel Sillesen
ccecc4f6bf Drive-by formatting of comment 2021-02-21 21:22:04 +01:00
Matthias Krüger
da9a588d4f remove redundant wrapping of return types of allow_internal_unstable() and rustc_allow_const_fn_unstable() 2021-02-21 18:11:27 +01:00
0yoyoyo
ce1a521012 Apply tidy check 2021-02-21 22:51:49 +09:00
Matthias Krüger
a9b90c02a2 rustc_mir: remove redundant wrapping of return type in numeric_intrinsic() 2021-02-21 13:44:16 +01:00
Matthias Krüger
76b9b16b4d rustc_codegen_ssa: remove unneeded wrapping of return type of execute_copy_from_cache_work_item (always returns Ok(..)) 2021-02-21 13:40:39 +01:00
Matthias Krüger
393878b15b remove redundant return value Ok(()) of clear_relocations() 2021-02-21 13:25:28 +01:00
Matthias Krüger
85bd00fd85 parser: remove unneccessary wrapping of return value in parse_extern() 2021-02-21 13:25:12 +01:00
Matthias Krüger
00bc134e43 remove unneccessary wrapping of return value in mk_await_expr() 2021-02-21 13:01:01 +01:00
Matthias Krüger
12080dc3a3 rustc_parse: remove unneccessary wrapping of return value in fn mk_range() which would always return Ok(..) 2021-02-21 12:54:49 +01:00
Matthias Krüger
4cb649bdb1 remove unneccessary wrapping of return value of allow_unstable(), it would always return Some(thing) 2021-02-21 12:52:51 +01:00
Camille GILLOT
903f65f215 Simplify hashing. 2021-02-21 12:22:22 +01:00
0yoyoyo
17176ccd78 Add indication of anonymous lifetime position 2021-02-21 18:38:20 +09:00
0yoyoyo
fece59b56c Change find_anon_type method to function 2021-02-21 18:29:14 +09:00
Yuki Okushi
882fd69b22
Rollup merge of #81966 - deg4uss3r:degausser/aarch64_apple_ios_sim, r=shepmaster
Add new `rustc` target for Arm64 machines that can target the iphonesimulator

This PR lands a new target (`aarch64-apple-ios-sim`) that targets arm64 iphone simulator, previously unreachable from Apple Silicon machines.

resolves #81632

r? `@shepmaster`
2021-02-21 15:26:42 +09:00
Camille GILLOT
a87de890fd Move print_query_stack to rustc_query_system. 2021-02-20 23:40:56 +01:00
Camille GILLOT
c26d965714 Move report_cycle to rustc_query_system.
The call to `ty::print::with_forced_impl_filename_line`
is done when constructing the description,
at the construction of the QueryStackFrame.
2021-02-20 23:36:31 +01:00
Joshua Nelson
3733275854 Update the bootstrap compiler
Note this does not change `core::derive` since it was merged after the
beta bump.
2021-02-20 17:19:30 -05:00
Camille GILLOT
3897395787 Move Query to rustc_query_system.
Rename it to QueryStackFrame and document a bit.
2021-02-20 22:53:47 +01:00
Camille GILLOT
0144d6a3b7 Do not hold query key in Query. 2021-02-20 22:53:46 +01:00
Camille GILLOT
f96e960ccf Access the session directly from DepContext. 2021-02-20 22:53:46 +01:00
Jan-Erik Rediger
8d6ad11ab2
iOS simulator: pick the target based on the environment variable
LLVM picks the right things to put into the compiled object file based
on the target deployment version.
We need to communicate it through the target triple.
Only with that LLVM will use the right commands in the file to make it
look and behave like code compiled for the arm64 iOS simulator target.
2021-02-20 16:45:00 -05:00
bors
d2b38d6b3c Auto merge of #82341 - GuillaumeGomez:rollup-t7y7tyg, r=GuillaumeGomez
Rollup of 7 pull requests

Successful merges:

 - #80595 (`impl PartialEq<Punct> for char`; symmetry for #78636)
 - #81991 (Fix panic in 'remove semicolon' when types are not local)
 - #82176 (fix MIR fn-ptr pretty-printing)
 - #82244 (Keep consistency in example for Stdin StdinLock)
 - #82260 (rustc: Show ``@path`` usage in stable)
 - #82316 (Fix minor mistake in LTO docs.)
 - #82332 (Don't generate src link on dummy spans)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-02-20 21:38:53 +00:00
Reese Williams
d8540ae5a9 Fix suggestion span and move suggestions into new subwindow. 2021-02-20 15:33:08 -05:00
Guillaume Gomez
8c095619cb
Rollup merge of #82260 - ojeda:rustc-argfile, r=jyn514
rustc: Show `@path` usage in stable

The feature was stabilized in #66172, but the usage string was not updated to be shown.
2021-02-20 20:37:02 +01:00
Guillaume Gomez
2d39300e2f
Rollup merge of #82176 - RalfJung:mir-fn-ptr-pretty, r=oli-obk
fix MIR fn-ptr pretty-printing

An uninitialized function pointer would get printed as `{{uninit  fn()}` (notice the unbalanced parentheses), and a dangling fn ptr would ICE. This fixes both of that.

However, I have no idea how to add tests for this.

Also, I don't understand this MIR pretty-printing code. Somehow the print function `pretty_print_const_scalar` actually *returns* a transformed form of the const (but there is no doc comment explaining what is being returned); some match arms do `p!` while others do `self =`, and there's a wild mixture of `p!` and `write!`... all very mysterious and confusing.^^

r? ``@oli-obk``
2021-02-20 20:37:00 +01:00
Guillaume Gomez
39af025741
Rollup merge of #81991 - osa1:issue81839, r=estebank
Fix panic in 'remove semicolon' when types are not local

It's not possible to check if removing a semicolon fixes the type error
when checking match arms and one or both of the last arm's and the
current arm's return types are imported "opaque" types. In these cases
we don't generate a "consider removing semicolon" suggestions.

Fixes #81839

---

I'm not sure how to add a test for this. I think the test would need at least two crates. Do we have any existing tests that do this so that I can take a look?
2021-02-20 20:36:57 +01:00
bors
83b30a639d Auto merge of #70951 - cjgillot:anarchy, r=oli-obk
Move the query engine out of rustc_middle

The handling of queries is moved to a trait `QueryEngine`.
It replaces `query::Queries` in the `TyCtxt`, allowing to move the query engine out of librustc_middle.

There are 2 modes to access the query engine: through `TyCtxt` and dynamic dispatch,
or through a `QueryCtxt`. The `QueryCtxt` is  required for everything touching the `OnDiskCache`.

For now, I put it in librustc_incremental, which is very small.
This may not be the best place.

A significant part of the codegen time for librustc_middle is moved to the recipient crate.

This PR may require a perf run.

cc #65031
r? `@Zoxc`
2021-02-20 18:58:05 +00:00
Ralf Jung
d496bfc161 all InterpError allocate now, so adjust alloc-error-check 2021-02-20 19:01:25 +01:00
r00ster91
447ce27198 Make "missing field" error message more natural 2021-02-20 18:32:02 +01:00
Henry Boisdequin
a9c6188889 make super_projection take a PlaceRef 2021-02-20 16:56:08 +05:30
Ralf Jung
e90674574d fn ptr pretty printing: fall back to raw ptr printing 2021-02-20 11:34:35 +01:00
bors
e7c23ab933 Auto merge of #82124 - tmiasko:op-ty-ref, r=oli-obk
Pass large interpreter types by reference, not value

r? `@ghost`
2021-02-20 10:20:42 +00:00
Dániel Buga
10f234240d Remove some P-s 2021-02-20 10:51:26 +01:00
Esteban Küber
f0637e4e18 Lower condition of if expression before it's "then" block
Fix #82290, fix #82250.
2021-02-19 17:00:31 -08:00
Camille GILLOT
9823c2cc70 Workaround rustdoc not honouring cfg(parallel_compiler). 2021-02-19 22:05:27 +01:00
LeSeulArtichaut
dd3772e4f0 A few more code cleanups 2021-02-19 19:19:50 +01:00
Ricky (deg4uss3r)
f10fbbbd53
added aarch64_apple_ios_sim as a rustc target 2021-02-19 13:17:05 -05:00
Santiago Pastorino
b3000ec0cd
Update pub_macro_rules since version 2021-02-19 13:53:02 -03:00
Vadim Petrochenkov
0fddc2f780
Support pub on macro_rules 2021-02-19 13:52:57 -03:00
Camille GILLOT
4581d16bcb Move the query system to rustc_query_impl. 2021-02-19 17:51:58 +01:00
Camille GILLOT
71f749a683 Introduce a QueryEngine trait object. 2021-02-19 17:51:57 +01:00
Camille GILLOT
23f9d10ea7 Make encode_query_results more generic. 2021-02-19 17:51:57 +01:00
Camille GILLOT
24dbb61e58 Move query names and Providers to parent module. 2021-02-19 17:51:57 +01:00
Camille GILLOT
8e5d613a11 Wrap QueryDescription into a macro. 2021-02-19 17:51:57 +01:00
Camille GILLOT
cdc0b199a9 Split DepKindStruct in two. 2021-02-19 17:51:56 +01:00
Camille GILLOT
1ac21e4571 Use QueryCtxt in DepKindStruct. 2021-02-19 17:51:56 +01:00
Camille GILLOT
b27266fdb2 Use a QueryContext for try_mark_green. 2021-02-19 17:51:56 +01:00
Camille GILLOT
3bd14c7bbe Select caching strategy per query.
The per-Key choice was not used.
2021-02-19 17:51:56 +01:00
Camille GILLOT
6e4af4a2d1 Move definition of callbacks to parent module. 2021-02-19 17:51:56 +01:00
Camille GILLOT
a4b1158f78 Move handle_deadlock where it is used. 2021-02-19 17:51:55 +01:00
Camille GILLOT
ea3d465c95 Move try_load_from_on_disk_cache to the QueryContext. 2021-02-19 17:51:55 +01:00
Camille GILLOT
4dbf83a209 Move try_print_query_stack to rustc_interface. 2021-02-19 17:51:55 +01:00
Camille GILLOT
0e9cac40a6 Make alloc_self_profile_query_strings a standalone function. 2021-02-19 17:51:55 +01:00
Camille GILLOT
5d71b99690 Make QueryEngine opaque to TyCtxt. 2021-02-19 17:51:54 +01:00
Camille GILLOT
3f868b1791 Opacify query invocation. 2021-02-19 17:51:50 +01:00
Camille GILLOT
2db2776589 Wrap TyCtxt inside a QueryCtxt for queries. 2021-02-19 17:51:50 +01:00
Camille GILLOT
dab9b89221 Decouple the on-disk cache from the query engine. 2021-02-19 17:51:50 +01:00