Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
3efe017
shrinking the deprecated method span
0xPoe May 24, 2021
c180af8
Address comment
0xPoe May 24, 2021
027d73d
Restrict Fake Read precision
roxelo May 25, 2021
382338f
Remove feature gate
roxelo May 27, 2021
7fed92b
rustc: Allow safe #[target_feature] on wasm
alexcrichton May 6, 2021
dbff14b
Clarify meaning of MachineApplicable suggestions.
m-ou-se May 31, 2021
a0228d9
Intra doc link-ify a reference to a function
est31 Jun 1, 2021
9283956
skip check_static on rvalue::threadlocalref
csmoe Jun 1, 2021
ba680aa
Add test for forward declared const param defaults
BoxyUwU Jun 1, 2021
f4f76e6
Reland - Report coverage `0` of dead blocks
richkadel May 1, 2021
521d9ab
convert Rvalue::threadlocalref assertion to delay bug
csmoe Jun 1, 2021
3844570
Restore the num_def_ids_untracked public function giving the total nu…
denismerigoux Jun 1, 2021
f353cbf
Generate better debuginfo for directly tagged enums
wesleywiser Apr 26, 2021
b644f06
Resolve EnumTagInfo FIXME
wesleywiser Apr 27, 2021
2a025c1
Remove fallback for containing scopes
wesleywiser Apr 28, 2021
141546c
Generate better debuginfo for niche-layout enums
wesleywiser May 13, 2021
2a9fa20
Add/update tests
wesleywiser May 13, 2021
d650091
Make tidy happy
wesleywiser May 14, 2021
d2d6fa8
Respond to review feedback
wesleywiser May 17, 2021
ef053fd
Change the type name from `_enum<..>` to `enum$<..>`
wesleywiser May 20, 2021
3127419
Respond to review feedback
wesleywiser May 26, 2021
012c323
Implement `Ty::is_enum` using `matches!`
tmiasko Jun 2, 2021
c898681
Add `Ty::is_union` predicate and use it
tmiasko Jun 2, 2021
957e2ef
Address comment
0xPoe Jun 2, 2021
11478bd
Validate type of locals used as indices
tmiasko Jun 2, 2021
f7c283c
Stabilize `vecdeque_binary_search`
SOF3 Mar 22, 2021
f51f277
Bumped `vecdeque_binary_search` stabilization version to 1.53.0
SOF3 Mar 22, 2021
f086f1e
Bump vecdeque_binary_search stabilization to 1.54.
m-ou-se Jun 2, 2021
f717992
Stabilize VecDeque::partition_point.
m-ou-se Jun 2, 2021
94c45ef
Update generator tests
wesleywiser Jun 2, 2021
11acbff
Rollup merge of #83362 - SOF3:stab/vecdeque-binary-search, r=m-ou-se
Dylan-DPC Jun 3, 2021
66eaa42
Rollup merge of #84988 - alexcrichton:safe-target-feature-wasm, r=jos…
Dylan-DPC Jun 3, 2021
f818167
Rollup merge of #85292 - wesleywiser:enum_debuginfo, r=michaelwoerister
Dylan-DPC Jun 3, 2021
f946bc5
Rollup merge of #85385 - richkadel:simpler-simplify-with-coverage, r=…
Dylan-DPC Jun 3, 2021
ab0b248
Rollup merge of #85617 - hi-rustin:rustin-patch-fix, r=estebank
Dylan-DPC Jun 3, 2021
0a02bf8
Rollup merge of #85724 - sexxi-goose:rox-fix-issue-85435, r=nikomatsakis
Dylan-DPC Jun 3, 2021
61e0d9a
Rollup merge of #85852 - m-ou-se:machineapplicable-docs, r=nikomatsakis
Dylan-DPC Jun 3, 2021
9f9ce89
Rollup merge of #85877 - est31:intra_doc_links, r=jyn514
Dylan-DPC Jun 3, 2021
6c03416
Rollup merge of #85880 - csmoe:ice-85768, r=oli-obk
Dylan-DPC Jun 3, 2021
6ce6c43
Rollup merge of #85889 - denismerigoux:master, r=petrochenkov
Dylan-DPC Jun 3, 2021
c11e324
Rollup merge of #85896 - BoxyUwU:remove-fixme-fwd-declared-const-defa…
Dylan-DPC Jun 3, 2021
2390917
Rollup merge of #85934 - tmiasko:is-union, r=jackh726
Dylan-DPC Jun 3, 2021
da85cce
Rollup merge of #85935 - tmiasko:validate-indexing, r=jonas-schievink
Dylan-DPC Jun 3, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 15 additions & 19 deletions compiler/rustc_mir_build/src/build/expr/as_rvalue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,25 +186,21 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
// };
// ```
//
// FIXME(RFC2229, rust#85435): Remove feature gate once diagnostics are
// improved and unsafe checking works properly in closure bodies again.
if this.tcx.features().capture_disjoint_fields {
for (thir_place, cause, hir_id) in fake_reads.into_iter() {
let place_builder =
unpack!(block = this.as_place_builder(block, &this.thir[*thir_place]));

if let Ok(place_builder_resolved) =
place_builder.try_upvars_resolved(this.tcx, this.typeck_results)
{
let mir_place =
place_builder_resolved.into_place(this.tcx, this.typeck_results);
this.cfg.push_fake_read(
block,
this.source_info(this.tcx.hir().span(*hir_id)),
*cause,
mir_place,
);
}
for (thir_place, cause, hir_id) in fake_reads.into_iter() {
let place_builder =
unpack!(block = this.as_place_builder(block, &this.thir[*thir_place]));

if let Ok(place_builder_resolved) =
place_builder.try_upvars_resolved(this.tcx, this.typeck_results)
{
let mir_place =
place_builder_resolved.into_place(this.tcx, this.typeck_results);
this.cfg.push_fake_read(
block,
this.source_info(this.tcx.hir().span(*hir_id)),
*cause,
mir_place,
);
}
}

Expand Down
5 changes: 5 additions & 0 deletions compiler/rustc_typeck/src/check/upvar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1588,6 +1588,11 @@ impl<'a, 'tcx> InferBorrowKind<'a, 'tcx> {
impl<'a, 'tcx> euv::Delegate<'tcx> for InferBorrowKind<'a, 'tcx> {
fn fake_read(&mut self, place: Place<'tcx>, cause: FakeReadCause, diag_expr_id: hir::HirId) {
if let PlaceBase::Upvar(_) = place.base {
// We need to restrict Fake Read precision to avoid fake reading unsafe code,
// such as deref of a raw pointer.
let place = restrict_capture_precision(place);
let place =
restrict_repr_packed_field_ref_capture(self.fcx.tcx, self.fcx.param_env, &place);
self.fake_reads.push((place, cause, diag_expr_id));
}
}
Expand Down