Commit graph

139135 commits

Author SHA1 Message Date
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
Giacomo Stevanato
3ec1a28418 Add FIXME for safety comments that are invalid when T is a ZST 2021-02-20 15:44:17 -05:00
Giacomo Stevanato
9b4e61255c Document BinaryHeap unsafe functions 2021-02-20 15:44:17 -05:00
Reese Williams
d8540ae5a9 Fix suggestion span and move suggestions into new subwindow. 2021-02-20 15:33:08 -05:00
Yoshitomo Nakanishi
d646aa2ae7 Fix unnecessary_sort_by.rs that fails the dogfood test 2021-02-21 05:05:13 +09:00
Yoshitomo Nakanishi
d23038944a New lint: inconsistent_struct_constructor 2021-02-21 05:05:11 +09:00
Guillaume Gomez
fc0cb5d5eb
Rollup merge of #82332 - GuillaumeGomez:no-src-link-on-dummy-spans, r=jyn514
Don't generate src link on dummy spans

Just realized that the "auto trait impls" had `[src]` links were leading to the crate root because they were dummy spans. This PR fixes this issue.

cc `@jyn514`
r? `@camelid`
2021-02-20 20:37:04 +01:00
Guillaume Gomez
77b6f96054
Rollup merge of #82316 - ehuss:lto-doc-fix, r=GuillaumeGomez
Fix minor mistake in LTO docs.

`-C lto=true` isn't a valid option.
2021-02-20 20:37:03 +01: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
c26a8bbd6d
Rollup merge of #82244 - pickfire:patch-6, r=dtolnay
Keep consistency in example for Stdin StdinLock

Stdin uses handle whereas StdinLock uses stdin_lock, changed it to handle.
2021-02-20 20:37:01 +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
Guillaume Gomez
d38f6e82a4
Rollup merge of #80595 - pthariensflame:patch-1, r=m-ou-se
`impl PartialEq<Punct> for char`; symmetry for #78636

Also fixes the "since" version of the original.

Pinging ``@dtolnay`` and ``@petrochenkov.``
2021-02-20 20:36:54 +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
Guillaume Gomez
0c511c9115 Add test for no src links on dummy spans 2021-02-20 19:51:38 +01:00
Guillaume Gomez
3071685505 Don't render [src] link on dummy spans 2021-02-20 19:51:38 +01:00
ThibsG
5af6f96c8f Fix camel case postfix for enum_variant_names lint 2021-02-20 19:48:04 +01:00
Ralf Jung
d496bfc161 all InterpError allocate now, so adjust alloc-error-check 2021-02-20 19:01:25 +01:00
Ralf Jung
3b81b47617 update Miri 2021-02-20 18:55:50 +01:00
r00ster91
447ce27198 Make "missing field" error message more natural 2021-02-20 18:32:02 +01:00
Simonas Kazlauskas
925ed4828d Update LLVM to pull in fixes to llvm-dwp
Includes https://github.com/rust-lang/llvm-project/pull/90 in
particular.
2021-02-20 15:56:36 +02:00
Simonas Kazlauskas
a0e8103ea3 Test CU directory is the work_dir
Make sure that we don't regress setting of the CU directory to the
working directory.
2021-02-20 15:56:36 +02: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
bors
67087a1b4e Auto merge of #6717 - booleancoercion:master, r=llogiq
Add the from_str_radix_10 lint

changelog: added the new `from_str_radix_10` which sometimes replaces calls to `primitive::from_str_radix` to `str::parse`

This is ready to be merged, although maybe the category should be `pedantic` instead of `style`? I'm not sure where it fits better.

Closes #6713.
2021-02-20 09:33:11 +00:00
bors
da5f7f1093 Auto merge of #81427 - klensy:eat-digits, r=m-ou-se
simplify eat_digits

Simplify eat_digits by checking values in iterator, plus decrease function size, by returning unchecked slices.

https://godbolt.org/z/cxjav4
2021-02-20 07:31:43 +00:00
bors
b75baad5c3 Auto merge of #78181 - GuillaumeGomez:sized-trait, r=jyn514
Add Sized trait display when implemented on type

Fixes https://github.com/rust-lang/rust/issues/24183.

I'm not too happy about the hack I had to add in here, however, it seems like the `Sized` trait is **very** special.

cc `@jyn514`
r? `@ollie27`
2021-02-20 04:35:58 +00:00
Eric Huss
bf8563dc9b Fix minor mistake in LTO docs.
`-C lto=true` isn't a valid option.
2021-02-19 19:34:46 -08:00
Jacob Hoffman-Andrews
7acb10514b Re-minify normalize.css.
This bypasses tidy's complaints about tab indent. Also, this lets us
remove comments while keeping the MIT license comment.
2021-02-19 18:49:00 -08:00
Jacob Hoffman-Andrews
9bbd48256d Update normalize.css to 8.0.1
From https://github.com/necolas/normalize.css/releases/tag/8.0.1.
2021-02-19 18:28:53 -08:00
Jacob Hoffman-Andrews
7ad4b7a62f Replace normalize.css 3.0.0 with unminified version.
This is in preparation to upgrade to 8.0.1, so the next commit
can contain more meaningful diffs.
2021-02-19 18:26:19 -08:00
Nixon Enraght-Moony
dd4b938c7f Implement using @set values 2021-02-20 01:50:12 +00:00
Alexander Ronald Altman
1839748772 impl PartialEq<Punct> for char; symmetry for #78636
Also fixes the "since" version of the original.
2021-02-19 17:28:19 -08:00
Nixon Enraght-Moony
cd5f603c31 Implement @set 2021-02-20 01:25:09 +00: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
Nixon Enraght-Moony
a00eb7ee1d Add @is command to jsondocck 2021-02-20 00:43:02 +00:00
bors
2746632917 Auto merge of #6766 - matthiaskrgr:nestedmatch, r=flip1995
collapsible_match: fix lint message capitalization

(see https://rustc-dev-guide.rust-lang.org/diagnostics.html for details)

---

*Please write a short comment explaining your change (or "none" for internal only changes)*
changelog: collapsible_match: fix lint message capitalization
2021-02-20 00:36:53 +00:00
bors
23de8013a6 Auto merge of #6764 - matthiaskrgr:lintcheck_par_iter, r=flip1995
lintcheck: parallelize

By default we use a single thread and one target dir as before.

If `-j n` is passed, use `n` target dirs and run one clippy in each of them.
We need several target dirs because cargo would lock them for a single process otherwise which would prevent the parallelism.
`-j 0` makes rayon use  $thread_count/2 (which I assume is the number of physical cores of a machine) for the number of threads.

Other change:
Show output of clippy being compiled when building it for lintcheck (makes it easier to spot compiler errors etc)
Show some progress indication in the "Linting... foo 1.2.3"  message.
Sort crates before linting (previously crates would be split randomly between target dirs, with the sorting, we try to make sure that even crates land in target dir 0 and odd ones in target dir 1 etc..)

*Please write a short comment explaining your change (or "none" for internal only changes)*
changelog: parallelize lintcheck with rayon
2021-02-20 00:25:10 +00:00
Matthias Krüger
8499a32859 lintcheck: add -j <N> option to configure threads.
defaults to 1
-j 0 choses the number of threads automtically (= number of physical cores)
2021-02-19 23:20:05 +01:00
Guillaume Gomez
46f24c912f Add tests for !Sized trait display 2021-02-19 22:38:07 +01:00
Guillaume Gomez
d20e05b78b Show negative implementation of Sized trait 2021-02-19 22:38:07 +01:00
Matthias Krüger
22aeec09e4 lintcheck: sort crates before linting 2021-02-19 22:16:53 +01:00
Matthias Krüger
4974734a24 lintcheck: show progress percentage in the "Linting..." message 2021-02-19 22:06:50 +01:00
Camille GILLOT
9823c2cc70 Workaround rustdoc not honouring cfg(parallel_compiler). 2021-02-19 22:05:27 +01:00
Matthias Krüger
d198551311 lintheck: show output (and compiler errors!) when compiling clippy for lintcheck 2021-02-19 21:52:34 +01:00
Matthias Krüger
bb5f9d18a0 lintcheck: tweak some comments 2021-02-19 21:48:52 +01:00
bool
c4b8d87ab9 Fixed the known problems section 2021-02-19 22:00:23 +02:00