Cameron Steffen
eaba3daa60
Remove qpath_res util function
2021-01-18 14:54:58 -06:00
bors
d98d2f57d9
Auto merge of #80707 - oli-obk:stability_hole_const_intrinsics, r=RalfJung
...
Stability oddity with const intrinsics
cc `@RalfJung`
In https://github.com/rust-lang/rust/pull/80699#discussion_r551495670 `@usbalbin` realized we accepted some intrinsics as `const` without a `#[rustc_const_(un)stable]` attribute. I did some digging, and that example works because intrinsics inherit their stability from their parents... including `#[rustc_const_(un)stable]` attributes. While we may want to fix that (not sure, wasn't there just a MCPed PR that caused this on purpose?), we definitely want tests for it, thus this PR adding tests and some fun tracing statements.
2021-01-18 20:54:36 +00:00
LeSeulArtichaut
dce2262dae
Use ty::{IntTy,UintTy,FloatTy} in rustdoc and clippy
2021-01-18 21:10:36 +01:00
LeSeulArtichaut
e0d64b9b0d
Use ty::{IntTy,UintTy,FloatTy} in rustdoc and clippy
2021-01-18 21:10:36 +01:00
LeSeulArtichaut
c3d7dc93dc
Use ty::{IntTy,UintTy,FloatTy} in rustc
2021-01-18 21:09:30 +01:00
LeSeulArtichaut
50e1ae15e9
Use ty::{IntTy,UintTy,FloatTy} in rustc
2021-01-18 21:09:30 +01:00
LeSeulArtichaut
933bb18956
Use rustc_type_ir::{IntTy,UintTy,FloatTy} instead of the rustc_ast` ones in types
2021-01-18 21:09:23 +01:00
LeSeulArtichaut
0724573448
Move a few more types to rustc_type_ir
2021-01-18 21:06:12 +01:00
Camelid
a7b7a435ea
Move test to src/test/ui/consts/
...
Apparently `tidy` has a hard limit of 2830 tests in the
`src/test/ui/issues/` directory, and this test hit that limit.
`src/test/ui/consts/` is probably a better location anyway.
2021-01-18 11:51:18 -08:00
Camelid
def0e9b8a4
Fix ICE with ReadPointerAsBytes validation error
2021-01-18 11:51:18 -08:00
Cameron Steffen
21fb586c0c
Query for TypeckResults in LateContext::qpath_res
...
Actually fulfills the documented guarantees.
2021-01-18 13:38:14 -06:00
Cameron Steffen
63a1eeea23
Reset LateContext enclosing body in nested items
...
Prevents LateContext::maybe_typeck_results() from returning data in a
nested item without a body. Consequently, LateContext::qpath_res is less
likely to ICE when called in a nested item. Would have prevented
rust-lang/rust-clippy#4545 , presumably.
2021-01-18 13:38:14 -06:00
bors
73f233b3ad
Auto merge of #81159 - ssomers:btree_cleanup_search, r=Mark-Simulacrum
...
BTreeMap: convert search functions to methods
And further tweak the signature of `search_linear`, in preparation of a better #81094 .
r? `@Mark-Simulacrum`
2021-01-18 17:30:38 +00:00
Konrad Borowski
ae3a515337
Avoid hash_slice in VecDeque's Hash implementation
...
Fixes #80303 .
2021-01-18 17:56:06 +01:00
Stein Somers
4775334f36
BTreeMap: prefer bulk_steal functions over specialized ones
2021-01-18 17:23:26 +01:00
soniasingla
47c2476c68
Fixes #81109 - Typo in pointer::wrapping_sub
...
Signed-off-by: soniasingla <soniasingla.1812@gmail.com >
2021-01-18 20:31:47 +05:30
bors
5e91c4ecc0
Auto merge of #81165 - KodrAus:rollup-s7llxis, r=KodrAus
...
Rollup of 12 pull requests
Successful merges:
- #81038 (Update Clippy)
- #81071 (rustc_parse_format: Fix character indices in find_skips)
- #81100 (prevent potential bug in `encode_with_shorthand`.)
- #81105 (Initialize a few variables directly)
- #81116 (ConstProp: Copy body span instead of querying it)
- #81121 (Avoid logging the whole MIR body in SimplifyCfg)
- #81123 (Update cmp.rs)
- #81125 (Add track_caller to .steal())
- #81128 (validation test: turn some const_err back into validation failures)
- #81131 (Edit rustc_middle::ty::cast docs)
- #81142 (Replace let Some(..) = with .is_some())
- #81153 (Remove unused linkcheck exceptions)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2021-01-18 14:36:30 +00:00
Ryan Levick
38b77420e9
Add tests for resolution changes
2021-01-18 14:01:09 +01:00
Daiki Ihara
8b041cd8f9
Add test case for suggestion E0283
2021-01-18 21:57:15 +09:00
Daiki Ihara
db95b5ca9b
Add suggestion for impl_candidates with E0283
...
Update compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs
Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com >
2021-01-18 21:57:15 +09:00
Tomasz Miąsko
508eec49e9
Combine instructions immediately
...
No functional changes intended
2021-01-18 13:15:27 +01:00
Tomasz Miąsko
a9292d871c
Remove disabled transformation from instcombine
2021-01-18 13:15:27 +01:00
Ralf Jung
712d065061
remove some outdated comments regarding debug assertions
2021-01-18 13:06:01 +01:00
Ashley Mannix
33d184bfd0
Rollup merge of #81153 - jyn514:linkcheck, r=Manishearth
...
Remove unused linkcheck exceptions
Found while working on https://github.com/deadlinks/cargo-deadlinks/issues/133 .
r? `@Manishearth`
2021-01-18 21:53:43 +10:00
Ashley Mannix
0068358ba4
Rollup merge of #81142 - wcampbell0x2a:replace-Some-with-is-some, r=jonas-schievink
...
Replace let Some(..) = with .is_some()
2021-01-18 21:53:41 +10:00
Ashley Mannix
d3cc598a02
Rollup merge of #81131 - pierwill:edit-rustc_middle-cast, r=varkor
...
Edit rustc_middle::ty::cast docs
Link to RFC 401 and add missing punctuation.
2021-01-18 21:53:40 +10:00
Ashley Mannix
8f1716c1f9
Rollup merge of #81128 - RalfJung:validation-testing, r=oli-obk
...
validation test: turn some const_err back into validation failures
This resolves the problem I raised at https://github.com/rust-lang/rust/pull/78407#discussion_r556732926 .
r? `@oli-obk`
2021-01-18 21:53:37 +10:00
Ashley Mannix
f82100eeed
Rollup merge of #81125 - jyn514:track-caller, r=lcnr
...
Add track_caller to .steal()
Before:
```
thread 'rustc' panicked at 'attempt to read from stolen value', /home/joshua/rustc/compiler/rustc_data_structures/src/steal.rs:43:15
```
After:
```
thread 'rustc' panicked at 'attempt to steal from stolen value', compiler/rustc_mir/src/transform/mod.rs:423:25
```
r? `@lcnr`
2021-01-18 21:53:35 +10:00
Ashley Mannix
0654e20195
Rollup merge of #81123 - sirh3e:sirh3e-patch-1, r=sfackler
...
Update cmp.rs
Fixed space
2021-01-18 21:53:33 +10:00
Ashley Mannix
e1d70bc697
Rollup merge of #81121 - tmiasko:simplify-cfg-no-dbg, r=jonas-schievink
...
Avoid logging the whole MIR body in SimplifyCfg
2021-01-18 21:53:31 +10:00
Ashley Mannix
064e47b99e
Rollup merge of #81116 - bugadani:body-span, r=wesleywiser
...
ConstProp: Copy body span instead of querying it
2021-01-18 21:53:30 +10:00
Ashley Mannix
b4defec768
Rollup merge of #81105 - LingMan:init_directly, r=nagisa
...
Initialize a few variables directly
Currently they are declared as `mut`, get initialized to a default value, and
then possibly overwritten.
By initializing to the final value directly, they don't need to be `mut` and
it's clear that they don't get mutated elsewhere later on.
2021-01-18 21:53:28 +10:00
Ashley Mannix
d3ff9ac8e8
Rollup merge of #81100 - lcnr:encode_with_shorthand, r=oli-obk
...
prevent potential bug in `encode_with_shorthand`.
see https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Remove.20PredicateKind.20in.20favor.20of.20only.20Bin.E2.80.A6.20compiler-team.23397/near/223012169
2021-01-18 21:53:26 +10:00
Ashley Mannix
c7ca540da2
Rollup merge of #81071 - osa1:fix_81006, r=estebank
...
rustc_parse_format: Fix character indices in find_skips
Fixes #81006
2021-01-18 21:53:24 +10:00
Ashley Mannix
9009f8f031
Rollup merge of #81038 - flip1995:clippyup, r=Manishearth
...
Update Clippy
Biweekly Clippy update
r? ``@Manishearth``
2021-01-18 21:53:22 +10:00
Ashley Mannix
090ab8c02e
Rollup merge of #81038 - flip1995:clippyup, r=Manishearth
...
Update Clippy
Biweekly Clippy update
r? ``@Manishearth``
2021-01-18 21:53:22 +10:00
Ikko Ashimine
222e0e4fe2
Fix typo in simplify.rs
...
prexisting -> preexisting
2021-01-18 20:52:10 +09:00
bors
66eb982166
Auto merge of #81015 - jyn514:feature-gate-ptr, r=camelid
...
Feature-gate `pointer` and `reference` in intra-doc links
r? `@camelid`
Addresses (but does not close) https://github.com/rust-lang/rust/issues/80896 .
2021-01-18 11:35:19 +00:00
oli
5bac1c9229
Only inherit const stability for methods of impl const Trait blocks
2021-01-18 11:07:35 +00:00
Ryan Levick
d829e40c7b
Improve unknown external crate error
2021-01-18 12:05:07 +01:00
Guillaume Gomez
1d1ab21ad9
Remove inline script tags
2021-01-18 12:03:53 +01:00
Ralf Jung
dc04ceae71
use raw-ptr-addr-of for slice::swap
2021-01-18 11:24:48 +01:00
bors
86e0ff47a0
Auto merge of #80995 - tmandry:instrument-method-checker, r=lcnr
...
Add tracing instrumentation to method typeck
I was recently digging into how this code works, and this instrumentation was helpful.
2021-01-18 08:39:31 +00:00
Stein Somers
de6e53a327
BTreeMap: convert search functions to methods
2021-01-18 09:31:14 +01:00
bors
0677d97293
Auto merge of #80865 - oliviacrain:proj_based, r=RalfJung
...
Use PlaceRef projection abstractions more consistently in rustc_mir
PlaceRef contains abstractions for dealing with the `projections` array. This PR uses these abstractions more consistently within the `rustc_mir` crate.
See associated issue: rust-lang/rust#80647 .
r? `@RalfJung`
2021-01-18 05:44:40 +00:00
Joshua Nelson
d5570c2fcb
Remove unused linkcheck exceptions
2021-01-17 22:36:39 -05:00
bors
93e0aedb07
Auto merge of #81090 - ssomers:btree_drainy_refactor_2, r=Mark-Simulacrum
...
BTreeMap: offer merge in variants with more clarity
r? `@Mark-Simulacrum`
2021-01-18 02:43:19 +00:00
Esteban Küber
70a43e07f6
Fix structured suggestion for explicit drop call
2021-01-17 16:48:52 -08:00
Nathan Nguyen
829f6bb672
fixed formatting typo in map_while
2021-01-17 18:14:58 -06:00
wcampbell
e23acc341c
Replace let Some(..) = with .is_some()
...
Signed-off-by: wcampbell <wcampbell1995@gmail.com >
2021-01-17 19:06:12 -05:00