Commit Graph

148827 Commits

Author SHA1 Message Date
hyd-dev
64044eb237
Check whether unwinding is allowed before popping the stack frame 2021-05-25 03:42:25 +08:00
hyd-dev
ac39f36526
🤦 2021-05-23 22:19:12 +08:00
hyd-dev
8ef3974007
Pass StackPopUnwind to eval_fn_call() and some other functions that are called by eval_fn_call() 2021-05-23 22:10:23 +08:00
hyd-dev
876fdcb9ec
"unwind" -> "unwinding" 2021-05-23 21:16:04 +08:00
hyd-dev
b98d6228db
Cleanup(Option<_>) -> Cleanup(BasicBlock), Skip 2021-05-23 21:15:59 +08:00
hyd-dev
e743eeb743
Don't evaluate self.fn_can_unwind(...) if can_unwind is already true 2021-05-23 04:24:48 +08:00
hyd-dev
835405199a
Refactor match + if 2021-05-23 04:24:47 +08:00
hyd-dev
da0abad492
Move the callee "can unwind" check to the right place 2021-05-23 04:24:42 +08:00
hyd-dev
7b3e10c751
const-eval: disallow unwinding across functions that !fn_can_unwind() 2021-05-23 04:20:53 +08:00
bors
ed20e1e533 Auto merge of #85514 - GuillaumeGomez:upgrade-minifer-version, r=Mark-Simulacrum
Upgrade minifier version to 0.0.41
2021-05-22 14:54:45 +00:00
bors
104a3c3510 Auto merge of #85557 - hyd-dev:abi, r=RalfJung
Add `rustc_mir::interpret::Machine::enforce_abi()`

To specify whether to skip the [ABI](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_target/abi/enum.Abi.html) check for function calls, so that we could test unwinding out of a `extern "C"` function call in Miri by disabling the check: https://github.com/rust-lang/miri/pull/1776#discussion_r633698382

I have tested that it works in Miri with a `-Zmiri-disable-abi-check` command line flag.
2021-05-22 11:49:13 +00:00
hyd-dev
7e42c975b9
Add default implementation for enforce_abi() 2021-05-22 19:11:47 +08:00
bors
70cb58ce27 Auto merge of #85568 - GuillaumeGomez:search-result-extra-info, r=jsha
Search result extra info

The CSS rule was not updated when we updated the search result, this fixes it:

Before:
![Screenshot from 2021-05-21 22-56-17](https://user-images.githubusercontent.com/3050060/119197314-d31a4e80-ba87-11eb-863a-bc0b3de3bfb2.png)

After:
![Screenshot from 2021-05-21 22-54-53](https://user-images.githubusercontent.com/3050060/119197227-b54ce980-ba87-11eb-9f43-c10803ca1b90.png)

r? `@jsha`
2021-05-22 07:07:38 +00:00
bors
21e1cd9b95 Auto merge of #85531 - luqmana:flip-gc, r=petrochenkov
Swap TargetOptions::linker_is_gnu default from false to true and update targets as appropriate.

#85274 gated the `--gc-sections` flag on targets that specified `linker_is_gnu` to stop us from passing it to incompatible linkers. But that had the unintended effect of the flag no longer being passed on targets for which it is valid and hence caused a regression in binary size. Given that most `ld`-style linkers are GNU compatible, this change flips our default for `linker_is_gnu` from false to true. That also means updating the targets that relied on the previous default:
* Apple
* Illumos
* L4Re (not sure about this one)
* MSVC
* NvtPtx
* Solaris

Fixes #85519
2021-05-22 04:42:36 +00:00
bors
51d1610356 Auto merge of #85505 - flip1995:clippyup, r=Manishearth
Update Clippy

Bi-weekly Clippy update

r? `@Manishearth`
2021-05-22 01:59:57 +00:00
Guillaume Gomez
45fd4bc118 Add test for search result keyword extra info 2021-05-21 22:54:16 +02:00
Guillaume Gomez
4c88f0c63b Fix display for primitive and keyword extra info 2021-05-21 22:54:16 +02:00
bors
5dc8789e30 Auto merge of #85560 - GuillaumeGomez:rollup-8k90rc7, r=GuillaumeGomez
Rollup of 4 pull requests

Successful merges:

 - #85506 (Reset "focusedByTab" field when doing another search)
 - #85548 (Remove dead toggle JS code)
 - #85550 (facepalm: operator precedence fail on my part.)
 - #85555 (Check for more things in THIR unsafeck)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-05-21 19:17:22 +00:00
Guillaume Gomez
0f48e6365b
Rollup merge of #85555 - LeSeulArtichaut:thir-unsafeck, r=nikomatsakis
Check for more things in THIR unsafeck

Reunion of #85306, #85381 and #85419 with conflicts resolved.
r? `@nikomatsakis`
2021-05-21 20:06:09 +02:00
Guillaume Gomez
9ec88ce78a
Rollup merge of #85550 - pnkfelix:fix-max-rss-division-on-mac, r=Mark-Simulacrum
facepalm: operator precedence fail on my part.

This bug was only visible on mac. Also, print_step_rusage is a relatively new
internal feature, that is not heavily used, and has no tests. All of these
factors contributed to how this went uncaught this long. Thanks to Josh Triplett
for pointing it out!
2021-05-21 20:06:08 +02:00
Guillaume Gomez
3f0bc5c23b
Rollup merge of #85548 - GuillaumeGomez:remove-dead-js, r=jsha
Remove dead toggle JS code

Explanations on how I got there: I randomly saw `adjustToggle` while browsing through code, checked where it was called, put a `debugger;` instruction in it and checked on all pages while playing with settings and toggles. The breakpoint was never triggered. I then looked at `collapseNonInherent` (its grand-parent). In there, the breakpoint was triggered so I look at what was being done and in fact... nothing. So I simply removed it all, re-ran the tests and play with the UI. Everything is working as expected.

Better double check in case I forgot to check a case though, but if nothing has been left out, then it's a great cleanup once again. :)

r? ``@jsha``
2021-05-21 20:06:07 +02:00
Guillaume Gomez
51a99eb603
Rollup merge of #85506 - GuillaumeGomez:reset-focusedByTab, r=jsha
Reset "focusedByTab" field when doing another search

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

The problem was simply that we forget to reset the `focusedByTab` field, which was still referring to removed DOM elements.

r? ``@jsha``
2021-05-21 20:06:06 +02:00
LeSeulArtichaut
0e1afc4501 Check for use of mutable/extern statics in THIR unsafeck 2021-05-21 19:51:53 +02:00
bors
9c0379c0f5 Auto merge of #85511 - Mark-Simulacrum:eq-not-sup, r=nikomatsakis
Adjust self-type check to require equality

When we encounter `SomeType::<X>::foo`, `self_ty` is `SomeType<X>` and the method is defined in an impl on `SomeType<A>`. Previously, we required simply that `self_ty <: impl_ty`, but this is too lax: we should require equality in order to use the method. This was found as part of unrelated work on never type stabilization, but also fixes one of the wf test cases.
2021-05-21 16:36:36 +00:00
LeSeulArtichaut
6b327aaa08 Check for ptr-to-int casts in const functions in THIR unsafeck 2021-05-21 18:31:44 +02:00
LeSeulArtichaut
592fecbafb Check for initialization of layout-restricted types 2021-05-21 18:29:51 +02:00
Felix S. Klock II
b3218d3d5d facepalm: operator precedence fail on my part.
This bug was only visible on mac. Also, print_step_rusage is a relatively new
internal feature, that is not heavily used, and has no tests. All of these
factors contributed to how this went uncaught this long. Thanks to Josh Triplett
for pointing it out!
2021-05-21 10:48:36 -04:00
hyd-dev
c69fba929b
Add rustc_mir::interpret::Machine::enforce_abi() 2021-05-21 22:24:57 +08:00
Mark Rousskov
4b4382d88b Adjust self-type to require equality 2021-05-21 10:16:53 -04:00
Guillaume Gomez
aee054d05d Remove dead toggle JS code 2021-05-21 15:57:12 +02:00
bors
af2ed1b518 Auto merge of #85482 - scottmcm:more-try-bootstrap, r=yaahc
`#[cfg(bootstrap)]` out `NoneError` and other v1 try_trait stuff

Closes #46871

r? `@yaahc`
2021-05-21 13:46:04 +00:00
bors
fc81ad22c4 Auto merge of #85416 - durin42:llvm-catchup-may-2021, r=nagisa
PassWrapper: update for LLVM change D102093

In https://reviews.llvm.org/D102093 lots of things stopped taking the
DebugLogging boolean parameter. Mercifully we appear to always set
DebugPassManager to false, so I don't think we're losing anything by not
passing this parameter.
2021-05-21 11:21:06 +00:00
bors
237b1ef0b9 Auto merge of #85400 - lnicola:rust-analyzer-2021-05-17, r=jonas-schievink
⬆️ rust-analyzer
2021-05-21 08:33:36 +00:00
Luqman Aden
3221a5e65b Remove linker_is_gnu: true cases as that is now the default. 2021-05-20 23:36:04 -07:00
bors
f36b137074 Auto merge of #85060 - ChrisDenton:win-file-exists, r=yaahc
Windows implementation of feature `path_try_exists`

Draft of a Windows implementation of `try_exists` (#83186).

The first commit reorganizes the code so I would be interested to get some feedback on if this is a good idea or not. It moves the `Path::try_exists` function to `fs::exists`. leaving the former as a wrapper for the latter. This makes it easier to provide platform specific implementations and matches the `fs::metadata` function.

The other commit implements a Windows specific variant of `exists`. I'm still figuring out my approach so this is very much a first draft. Eventually this will need some more eyes from knowledgable Windows people.
2021-05-21 05:47:24 +00:00
bors
6f5a198ffc Auto merge of #85382 - Aaron1011:project-eval, r=nikomatsakis
Always produce sub-obligations when using cached projection result

See https://github.com/rust-lang/rust/issues/85360

When we skip adding the sub-obligations to the `obligation` list, we can affect whether or not the final result is `EvaluatedToOk` or `EvaluatedToOkModuloObligations`. This creates problems for incremental compilation, since the projection cache is untracked shared state.

To solve this issue, we unconditionally process the sub-obligations. Surprisingly, this is a slight performance *win* in many cases.
2021-05-21 02:39:39 +00:00
bors
746ac21e48 Auto merge of #85524 - RalfJung:miri, r=RalfJung
update miri

Fixes https://github.com/rust-lang/rust/issues/85468
2021-05-20 23:53:36 +00:00
Luqman Aden
0188664425 Swap TargetOptions::linker_is_gnu default from false to true and update targets as appropriate. 2021-05-20 16:47:08 -07:00
bors
40d2302047 Auto merge of #85521 - alexcrichton:less-tls-inline, r=Mark-Simulacrum
std: Don't inline TLS accessor on MinGW

This is causing [issues] on Cargo's own CI for MinGW and given the
original investigation there's no reason that MinGW should work when
MSVC doesn't, this this tweaks the MSVC exception to being a Windows exception.

[issues]: https://github.com/rust-lang/cargo/runs/2626676503?check_suite_focus=true#step:9:2453
2021-05-20 21:11:19 +00:00
Ralf Jung
6725104470 update miri 2021-05-20 22:05:08 +02:00
Alex Crichton
75df635cb8 std: Don't inline TLS accessor on MinGW
This is causing [issues] on Cargo's own CI for MinGW and given the
original investigation there's no reason that MinGW should work when
MSVC doesn't, this this tweaks the MSVC exception to being a Windows exception.

[issues]: https://github.com/rust-lang/cargo/runs/2626676503?check_suite_focus=true#step:9:2453
2021-05-20 12:45:05 -07:00
bors
99e3aef020 Auto merge of #85518 - GuillaumeGomez:rollup-mq4ohfy, r=GuillaumeGomez
Rollup of 5 pull requests

Successful merges:

 - #85275 (Move `std::memchr` to `sys_common`)
 - #85326 (bootstrap: ensure host std when cross-compiling tools, fixes #85320)
 - #85375 (Fix missing lifetimes diagnostics after #83759)
 - #85507 (Extend escape key check)
 - #85509 (Prevent tab title to "null" if the URL is a search one)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-05-20 18:30:26 +00:00
Guillaume Gomez
247e2e24eb
Rollup merge of #85509 - GuillaumeGomez:search-null-title, r=jsha
Prevent tab title to "null" if the URL is a search one

When we arrive on page with a search parameter in the URL, until the results are displayed, the page title is "null". It's because of this code:

```js
if (params.search !== undefined) {
    var search = searchState.outputElement();
    search.innerHTML = "<h3 style=\"text-align: center;\">" +
       searchState.loadingText + "</h3>";
    searchState.showResults(search);
    loadSearch();
}
```

In `searchState.showResults`, we have this:

```js
document.title = searchState.title;
```

But since it's `null`, we set it as title. This PR fixes it.

r? `@jsha`
2021-05-20 17:56:58 +02:00
Guillaume Gomez
0918348eaf
Rollup merge of #85507 - GuillaumeGomez:extend-escape-key-check, r=jsha
Extend escape key check

Since #84462 has been merged, we can now extend the `escape-key` test.

r? `@jsha`
2021-05-20 17:56:57 +02:00
Guillaume Gomez
67d5435695
Rollup merge of #85375 - SkiFire13:fix-85347, r=jackh726
Fix missing lifetimes diagnostics after #83759

In #83759 while rebasing I didn't realize there was a new function for suggesting to add lifetime arguments. It relied on some invariants, namely that if a generic type/trait has angle brackets then it must have some generic argument, which is now no longer true. This PR updates that function to handle the new invariants.

This also adds a new regression test but I'm not sure if that's the correct place for it.

Fixes #85347
2021-05-20 17:56:56 +02:00
Guillaume Gomez
ddc376c03d
Rollup merge of #85326 - infinity0:fix-cross-compile-tools, r=Mark-Simulacrum
bootstrap: ensure host std when cross-compiling tools, fixes #85320
2021-05-20 17:56:51 +02:00
Guillaume Gomez
0d3bee8be0
Rollup merge of #85275 - CDirkx:memchr, r=m-ou-se
Move `std::memchr` to `sys_common`

`std::memchr` is a thin abstraction over the different `memchr` implementations in `sys`, along with documentation and tests. The module is only used internally by `std`, nothing is exported externally. Code like this is exactly what the `sys_common` module is for, so this PR moves it there.
2021-05-20 17:56:46 +02:00
bors
9a3214e9be Auto merge of #85493 - Amanieu:fix_85446, r=dtolnay
Update stdarch to fix x86 byte shift intrinsics

Fixes #85446
2021-05-20 15:49:31 +00:00
Guillaume Gomez
a6b0b5d8fb Upgrade minifier version to 0.0.41 2021-05-20 16:51:44 +02:00
Guillaume Gomez
222126adaf Prevent tab title to "null" if the URL is a search one 2021-05-20 16:01:08 +02:00