Commit Graph

172485 Commits

Author SHA1 Message Date
Dylan DPC
6dae197afa
Rollup merge of #99241 - danbev:intrinsics-comment, r=fee1-dead
Remove comment referring to constness.rs

This commit removes the comment in emulate_intrinsic, which is
currently referring to `src/librustc_middle/ty/constness.rs`.
2022-07-15 10:39:46 +05:30
Dylan DPC
bc8abdb44c
Rollup merge of #99239 - vakaras:add-myself-to-mir-followers, r=tmiasko
Add myself to the set of people notified when MIR changes.

I would like to be notified when changes to MIR are made.
2022-07-15 10:39:45 +05:30
Dylan DPC
fe6062f829
Rollup merge of #99237 - GuillaumeGomez:rustdoc-css-cleanup, r=notriddle
removed unused CSS and unused HTML IDs

I think that should cover most remaining unused CSS/HTML IDs.

r? `@notriddle`
2022-07-15 10:39:44 +05:30
Dylan DPC
7b63058d13
Rollup merge of #99131 - compiler-errors:label-fn, r=cjgillot
Add label for generic arg (+ APIT) and RPIT callables in `label_fn_like`

Fixes #98308
2022-07-15 10:39:43 +05:30
Dylan DPC
99f3132cd7
Rollup merge of #99113 - WaffleLapkin:arc_simplify, r=Mark-Simulacrum
Simplify [a]rc code a little

Nothing interesting, just make [a]rc code a little nicer by using `byte_sub` and `let`-`else`.
2022-07-15 10:39:41 +05:30
Ikko Ashimine
67a6c0a7ee
Fix typo in mod.rs
constuct -> construct
2022-07-15 12:57:46 +09:00
bors
b90a0ede02 Auto merge of #97406 - aliemjay:verify-bounds-fix-master, r=oli-obk
Make outlives::{components,verify} agree

fixes #97405

cc `@oli-obk` this is should fix https://github.com/rust-lang/rust/pull/95474#discussion_r880660075

r? `@oli-obk`
2022-07-15 03:44:53 +00:00
Michael Goulet
4b890f3474 Remove some span_of_impl+unwrap 2022-07-15 03:17:21 +00:00
Michael Goulet
03bfbe1fb3 Move item_span from check_item_type into each function 2022-07-15 03:17:21 +00:00
Michael Goulet
78efaf43e4 remove tcx from ObligationCauseCode::span 2022-07-15 03:17:20 +00:00
Michael Goulet
27b6ab9129 Remove some more usages of guess_head_span 2022-07-15 03:17:20 +00:00
Michael Goulet
57f7618f62 Remove some usages of guess_head_span from typeck 2022-07-15 03:17:20 +00:00
Michael Goulet
aad2334ecb Make item spans more consistent 2022-07-15 03:17:20 +00:00
Jiahao XU
d8aba1002a
Improve example of downcast
Co-authored-by: Jane Losare-Lusby <jlusby42@gmail.com>
2022-07-15 13:04:06 +10:00
bors
30243dd87e Auto merge of #98203 - kckeiks:gather-body-owners-in-hir-item-queries, r=cjgillot
gather body owners

Issue #96341
2022-07-15 01:03:55 +00:00
Michael Goulet
d25abdc0c5 Point out custom Fn-family trait impl 2022-07-14 23:36:46 +00:00
Michael Goulet
ddb7003b79 Add support for APIT and RPIT callables in label_fn_like 2022-07-14 23:29:03 +00:00
Ralf Jung
6c6cccdd9b interpret/validity: improve some comments 2022-07-14 19:19:15 -04:00
Manish Goregaokar
62edbbecb7 Add regression test for #89436 2022-07-14 15:40:46 -07:00
bors
1ba1fec234 Auto merge of #96544 - m-ysk:feature/issue-96358, r=cjgillot
Stop keeping metadata in memory before writing it to disk

Fixes #96358

I created this PR according with the instruction given in the issue except for the following points:

- While the issue says "Write metadata into the temporary file in `encode_and_write_metadata` even if `!need_metadata_file`", I could not do that. That is because though I tried to do that and run `x.py test`, I got a lot of test failures as follows.

<details>
<summary>List of failed tests</summary>
<pre>
<code>
failures:
    [ui] src/test/ui/json-multiple.rs
    [ui] src/test/ui/json-options.rs
    [ui] src/test/ui/rmeta/rmeta-rpass.rs
    [ui] src/test/ui/save-analysis/emit-notifications.rs
    [ui] src/test/ui/svh/changing-crates.rs
    [ui] src/test/ui/svh/svh-change-lit.rs
    [ui] src/test/ui/svh/svh-change-significant-cfg.rs
    [ui] src/test/ui/svh/svh-change-trait-bound.rs
    [ui] src/test/ui/svh/svh-change-type-arg.rs
    [ui] src/test/ui/svh/svh-change-type-ret.rs
    [ui] src/test/ui/svh/svh-change-type-static.rs
    [ui] src/test/ui/svh/svh-use-trait.rs

test result: FAILED. 12915 passed; 12 failed; 100 ignored; 0 measured; 0 filtered out; finished in 71.41s

Some tests failed in compiletest suite=ui mode=ui host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
Build completed unsuccessfully in 0:01:58
</code>
</pre>
</details>

- I could not resolve the extra tasks about `create_rmeta_file` and `create_compressed_metadata_file` for my lack of ability.
2022-07-14 21:50:14 +00:00
pierwill
0d45977aa5 Remove FIXME from MIR always_storage_live_locals 2022-07-14 15:30:36 -05:00
leo60228
62aafb01b1
Rename aarch64-nintendo-switch to aarch64-nintendo-switch-freestanding 2022-07-14 15:58:26 -04:00
leo60228
d04753e19e
Add aarch64-nintendo-switch.md to SUMMARY.md
I can't think of any other reason CI might be failing, and I should've
done this anyway.
2022-07-14 15:58:22 -04:00
leo60228
fd81b99a99
Add docs for Switch target 2022-07-14 15:58:17 -04:00
leo60228
c690db4024
Remove obsolete crt0 references in linker script 2022-07-14 15:58:11 -04:00
jam1garner
7f8804915e
Remove unneeded options from Nintendo Switch target 2022-07-14 15:58:09 -04:00
leo60228
bee373c699
Don't build std for switch 2022-07-14 15:57:21 -04:00
leo60228
4bc8549cb3
Add linker script for switch 2022-07-14 15:57:19 -04:00
leo60228
f688a56ef6
Remove unnecessary linker args 2022-07-14 15:56:41 -04:00
leo60228
60beb1a995
Don't use host linker for switch 2022-07-14 15:56:16 -04:00
jam1garner
e6aedf6056
Add Nintendo Switch tier 3 target 2022-07-14 15:55:58 -04:00
bors
c2f428d2f3 Auto merge of #99252 - lqd:win-dwarf5, r=eddyb
fix dwarf debuginfo being used in addition to CodeView on windows

Tackles the debuginfo size increase regression on windows to [unblock clippy](https://github.com/rust-lang/rust/issues/99143#issuecomment-1184638573) -- introduced by the DWARF5 support in #98350 cc `@pcwalton.`

r? `@eddyb`
Fixes #99143
2022-07-14 19:03:58 +00:00
Rémy Rakic
97510f2128 fix dwarf debuginfo being used in addition to CodeView on windows
Fixes the debuginfo size increase regression introduced by the DWARF5 support.
2022-07-14 20:41:55 +02:00
Guillaume Gomez
b98fb490b8 Correctly handle crate level page on docs.rs as well 2022-07-14 20:26:45 +02:00
bors
74621c764e Auto merge of #99242 - Dylan-DPC:rollup-34bqdh8, r=Dylan-DPC
Rollup of 6 pull requests

Successful merges:

 - #98072 (Add provider API to error trait)
 - #98580 (Emit warning when named arguments are used positionally in format)
 - #99000 (Move abstract const to middle)
 - #99192 (Fix spans for asm diagnostics)
 - #99222 (Better error message for generic_const_exprs inference failure)
 - #99236 (solaris: unbreak build on native platform)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-07-14 16:23:07 +00:00
Ralf Jung
e3ef4fdac9 rename MPlaceTy::dangling to fake_alloc_zst 2022-07-14 11:40:47 -04:00
Igor Matuszewski
e24d13d10f Update RLS 2022-07-14 17:23:46 +02:00
Daniel Bevenius
ed73037661 Remove comment referring to constness.rs
This commit removes the comment in emulate_intrinsic, which is
currently referring to 'src/librustc_middle/ty/constness.rs'.
2022-07-14 16:30:48 +02:00
Dylan DPC
f74358d052
Rollup merge of #99236 - psumbera:Issue99208, r=Mark-Simulacrum
solaris: unbreak build on native platform

Fixes: #99208
2022-07-14 19:24:08 +05:30
Dylan DPC
39936fd0b7
Rollup merge of #99222 - atsuzaki:generic_const_err, r=lcnr
Better error message for generic_const_exprs inference failure

Fixes #90531

This code:
```rs
#![feature(generic_const_exprs)]

fn foo<const N: usize>(_arr: [u64; N + 1]) where [u64; N + 1]: {}

fn main() {
  let arr = [5; 5];
  foo(arr);
}
```

Will now emit the following error:
```rs
warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
 --> test.rs:1:12
  |
1 | #![feature(generic_const_exprs)]
  |            ^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information

error[E0284]: type annotations needed
 --> test.rs:8:7
  |
8 |       foo(arr);
  |       ^^^ cannot infer the value of the const parameter `N` declared on the function `foo`
  |
note: required by a bound in `foo`
 --> test.rs:3:56
  |
3 | fn foo<const N: usize>(_arr: [u64; N + 1]) where [u64; N + 1]: {}
  |                                                        ^^^^^ required by this bound in `foo`
help: consider specifying the generic argument
  |
8 |       foo::<N>(arr);
  |          +++++

error: aborting due to previous error; 1 warning emitted
```

cc: `@lcnr` thanks a lot again for the help on this
2022-07-14 19:24:06 +05:30
Dylan DPC
d3a1aa0b43
Rollup merge of #99192 - Amanieu:fix-asm-srcloc, r=petrochenkov
Fix spans for asm diagnostics

Line spans were incorrect if the first line of an asm statement was an
empty string.
2022-07-14 19:24:05 +05:30
Dylan DPC
ecae3d74e2
Rollup merge of #99000 - JulianKnodt:allow_resolve_no_substs, r=lcnr
Move abstract const to middle

Moves AbstractConst (and all associated methods) to rustc middle for use in `rustc_infer`.
This allows for const resolution in infer to use abstract consts to walk consts and check if
they are resolvable.

This attempts to resolve the issue where `Foo<{ concrete const }, generic T>` is incorrectly marked as conflicting, and is independent from the other issue where nested abstract consts must be resolved.

r? `@lcnr`
2022-07-14 19:24:04 +05:30
Dylan DPC
8c5c983e5b
Rollup merge of #98580 - PrestonFrom:issue_98466, r=estebank
Emit warning when named arguments are used positionally in format

Addresses Issue 98466 by emitting an error if a named argument
is used like a position argument (i.e. the name is not used in
the string to be formatted).

Fixes rust-lang#98466
2022-07-14 19:24:03 +05:30
Dylan DPC
2b17aa67fc
Rollup merge of #98072 - yaahc:generic-member-access, r=thomcc
Add provider API to error trait

Implements https://github.com/rust-lang/rfcs/pull/2895
2022-07-14 19:24:02 +05:30
bors
24699bcbad Auto merge of #95956 - yaahc:stable-in-unstable, r=cjgillot
Support unstable moves via stable in unstable items

part of https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/moving.20items.20to.20core.20unstably and a blocker of https://github.com/rust-lang/rust/pull/90328.

The libs-api team needs the ability to move an already stable item to a new location unstably, in this case for Error in core. Otherwise these changes are insta-stable making them much harder to merge.

This PR attempts to solve the problem by checking the stability of path segments as well as the last item in the path itself, which is currently the only thing checked.
2022-07-14 13:42:09 +00:00
Guillaume Gomez
4580668ca8 Removed unused HTML IDs 2022-07-14 15:03:51 +02:00
Guillaume Gomez
62d3b79d4b Remove unused CSS 2022-07-14 15:03:34 +02:00
Vytautas Astrauskas
eb1a0c55f1 Add vakaras to the set of people notified when MIR changes. 2022-07-14 14:24:36 +02:00
Petr Sumbera
1e64a7b4f1 solaris: unbreak build on native platform
Fixes: #99208
2022-07-14 13:44:40 +02:00
bors
f1a8854f9b Auto merge of #99231 - Dylan-DPC:rollup-0tl8c0o, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #97720 (Always create elided lifetime parameters for functions)
 - #98315 (Stabilize `core::ffi:c_*` and rexport in `std::ffi`)
 - #98705 (Implement `for<>` lifetime binder for closures)
 - #99126 (remove allow(rustc::potential_query_instability) in rustc_span)
 - #99139 (Give a better error when `x dist` fails for an optional tool)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-07-14 11:00:30 +00:00