Yuki Okushi
e239fd2b88
Rollup merge of #97031 - eholk:drop-tracking-type-error, r=compiler-errors
...
Drop tracking: handle invalid assignments better
Previously this test case was crashing with an index out of bounds error deep in the call to `needs_drop`. We avoid this by detecting clearly invalid assignees in the `mutate` callback and ignoring these.
2022-05-14 13:42:55 +09:00
Yuki Okushi
ec14d946ae
Rollup merge of #97018 - GuillaumeGomez:fail-on-js-error, r=notriddle
...
Ensure that test fail if a JS error occurs
Fixes #96902 .
r? ``@notriddle``
2022-05-14 13:42:54 +09:00
Yuki Okushi
e6fc0c4b43
Rollup merge of #97005 - est31:master, r=petrochenkov
...
Two small improvements of rustc_expand
I found them while doing #96150
r? ``@petrochenkov``
2022-05-14 13:42:53 +09:00
Yuki Okushi
93a4dfd737
Rollup merge of #96998 - notriddle:notriddle/var-N, r=jsha
...
rustdoc: remove weird, unused variable from source-files.js
2022-05-14 13:42:52 +09:00
Yuki Okushi
c031413f28
Rollup merge of #96986 - kdashg:save-an-enum-vars, r=oli-obk
...
[save-analysis] Reference the variant not enum at struct-literal cons…
…truction.
Closes #96985
2022-05-14 13:42:50 +09:00
Yuki Okushi
6c6958b531
Rollup merge of #95365 - mkroening:hermit-alloc-error-handler, r=joshtriplett
...
Use default alloc_error_handler for hermit
Hermit now properly separates kernel from userspace.
Applications for hermit can now use Rust's default `alloc_error_handler` instead of calling the kernel's `__rg_oom`.
CC: ``@stlankes``
2022-05-14 13:42:49 +09:00
bors
9fbbe75fd7
Auto merge of #95602 - scottmcm:faster-array-intoiter-fold, r=the8472
...
Fix `array::IntoIter::fold` to use the optimized `Range::fold`
It was using `Iterator::by_ref` in the implementation, which ended up pessimizing it enough that, for example, it didn't vectorize when we tried it in the <https://rust-lang.zulipchat.com/#narrow/stream/257879-project-portable-simd/topic/Reducing.20sum.20into.20wider.20types > conversation.
Demonstration that the codegen test doesn't pass on the current nightly: <https://rust.godbolt.org/z/Taxev5eMn >
2022-05-14 03:12:53 +00:00
Eric Holk
6665a4328b
Fix nit
2022-05-13 19:32:53 -07:00
Gary Guo
fbb3c19e03
Use re-export instead of inline wrapper in libunwind
...
This ensures that there are no calls to `C-unwind` function in libunwind.
2022-05-14 02:53:59 +01:00
Gary Guo
68f063bf3f
Use Rust ABI for __rust_start_panic
and _{rdl,rg}_oom
2022-05-14 02:53:59 +01:00
Eric Holk
5c98737715
Drop tracking: handle invalid assignments better
...
Previously this test case was crashing with an index out of bounds error
deep in the call to `needs_drop`. We avoid this by detecting clearly
invalid assignees in the `mutate` callback and ignoring these.
2022-05-13 16:25:22 -07:00
Jack Huey
0247faed29
Add bound_impl_trait_ref
2022-05-13 18:27:40 -04:00
Jack Huey
6c05e8d009
Add bound_fn_sig
2022-05-13 18:27:40 -04:00
Jack Huey
c92248ab9f
Add bound_type_of
2022-05-13 18:27:18 -04:00
Chris Martin
3de6c2ca33
Address review feedback
2022-05-13 18:14:03 -04:00
bors
f1f721e640
Auto merge of #97013 - matthiaskrgr:rollup-c1pc6pc, r=matthiaskrgr
...
Rollup of 5 pull requests
Successful merges:
- #96154 (Expand core::hint::unreachable_unchecked() docs)
- #96615 (Add a regression test for #54779 )
- #96982 (fix clippy expect_fun_call)
- #97003 (Remove some unnecessary `rustc_allow_const_fn_unstable` attributes.)
- #97011 (Add regression test for #28935 )
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-05-13 20:26:04 +00:00
Vadim Petrochenkov
9ba5281c76
resolve: Move collection of all macro_rules
in the crate to rustdoc
2022-05-13 21:43:36 +03:00
bors
9ad4bde042
Auto merge of #95356 - coolreader18:exitstatus-exit-method, r=<try>
...
ExitCode::exit_process() method
cc `@yaahc` / #93840
(eeek, hit ctrl-enter before I meant to and right after realizing the branch name was wrong. oh, well)
I feel like it makes sense to have the `exit(ExitCode)` function as a method or at least associated function on ExitCode, but maybe that would hurt discoverability? Probably not as much if it's at the top of the `process::exit()` documentation or something, but idk. Also very unsure about the name, I'd like something that communicates that you are exiting with *this* ExitCode, but with a method name being postfix it doesn't seem to flow. `code.exit_process_with()` ? `.exit_process_with_self()` ? Blech. Maybe it doesn't matter, since ideally just `code.exit()` or something would be clear simply by the name and single parameter but 🤷
Also I'd like to touch up the `ExitCode` docs (which I did a bit here), but that would probably be good in a separate PR, right? Since I think the beta deadline is coming up.
2022-05-13 18:29:13 +00:00
Noa
a9e29d204e
Guarantee less in docs
2022-05-13 13:28:24 -05:00
Noa
688dcc68fe
Add ExitCode::exit_process example
2022-05-13 13:28:22 -05:00
Gary Guo
f86e409f09
Don't hardcode attribute id in codegen test
2022-05-13 19:18:02 +01:00
Mateusz Mikuła
60361f2ca3
Add LLVM based mingw-w64 targets
2022-05-13 20:14:15 +02:00
Vadim Petrochenkov
6c5c7f503e
Fix rebase
2022-05-13 20:42:53 +03:00
Vadim Petrochenkov
a9c14dc440
rustdoc: Use Visibility::is_public
more
2022-05-13 20:42:53 +03:00
Vadim Petrochenkov
7689857884
rustdoc: Do not resolve associated item paths unnecessarily
2022-05-13 20:42:53 +03:00
Vadim Petrochenkov
7c2283d3ca
rustdoc: Do not create UrlFragment
s until they are necessary
...
This simplifies error types and allows to remove `fn resolve_inner` and `fn check_full_res`
`visited_links` caching is not touched for now
2022-05-13 20:42:53 +03:00
Vadim Petrochenkov
7256c6f93e
rustdoc: Remove fn resolve_macro
...
and otherwise unify resolution in macro namespace and other namespaces
2022-05-13 20:42:53 +03:00
Vadim Petrochenkov
95fb05d4d8
rustdoc: Remove ResolutionFailure::Dummy
...
The variant resolution check didn't make sense, and derive trait collision could be processed in a different way
2022-05-13 20:42:52 +03:00
Vadim Petrochenkov
c979ef5d8c
rustdoc: Remove ResolutionFailure::MalformedGenerics
...
in favor of `PreprocessingError::MalformedGenerics`
2022-05-13 20:42:52 +03:00
Vadim Petrochenkov
51eda747b1
rustdoc: Remove ResolutionFailure::NoParentItem
...
It's a bug and not an error
2022-05-13 20:42:52 +03:00
carbotaniuman
bd5fce65c6
Rustc changes for permissive provenance
2022-05-13 12:30:25 -05:00
Volker-Weissmann
30108ca15c
Added note in documentation
...
I added this note, because if you forget the `--target` flags, you get a really ugly error message.
https://github.com/rust-lang/cargo/issues/10666
2022-05-13 18:37:07 +02:00
Miguel Guarniz
f1c256d168
remove redundant branch
...
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13 11:46:06 -04:00
Miguel Guarniz
17e86d9ff9
remove unnecessary methods from HirIdValidator
...
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13 11:46:06 -04:00
Miguel Guarniz
433a5f1144
avoid converting to DefId from LocalDefId when using query
...
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13 11:46:06 -04:00
Miguel Guarniz
91223acde3
use for_each_module instead of iterating over Item's
...
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13 11:46:06 -04:00
Miguel Guarniz
df119428a2
change for_each_module's parameter to FnMut
...
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13 11:46:06 -04:00
Miguel Guarniz
cad1fd2f16
update rustdoc code to use new method name
...
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13 11:46:06 -04:00
Miguel Guarniz
2e98879403
change back to using tcx.hir() visit-item method
...
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13 11:46:06 -04:00
Miguel Guarniz
f975d05116
rename visit item-like methods
...
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13 11:46:06 -04:00
Miguel Guarniz
7e44078e9a
update comments about visitor strategy
...
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13 11:46:06 -04:00
Miguel Guarniz
93616dd539
remove ItemLikeVisitor and DeepVisitor
...
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13 11:46:06 -04:00
Miguel Guarniz
0b7dd95475
remove HirVisitor
...
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13 11:46:06 -04:00
Miguel Guarniz
885b90bb34
remove DebuggerVisualizerCollector
...
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13 11:46:06 -04:00
Miguel Guarniz
52d721c3fa
remove TestItemNamesVisitor
...
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13 11:46:06 -04:00
Miguel Guarniz
cdba1dcef6
add module_items
...
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13 11:46:06 -04:00
Miguel Guarniz
e166409f0d
remove Visitor impl for PrivateItemsInPublicInterfacesChecker
...
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13 11:46:06 -04:00
Miguel Guarniz
e8ef5bf464
remove TraitVisitor
...
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13 11:46:06 -04:00
Miguel Guarniz
eea16de9f7
replace hir().def_kind for def_kind query in rustc_passes
...
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13 11:46:05 -04:00
Miguel Guarniz
90685c6333
check def_kind before fetching item
...
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13 11:46:05 -04:00