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

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
1e3302d
Suggest dereferencing on assignment to mutable borrow
estebank May 22, 2019
f44b264
fix dangling reference in Vec::append
RalfJung May 23, 2019
3cbf586
tweak discriminant on non-nullary enum diagnostic
euclio May 22, 2019
6116f19
Box::into_unique: do the reborrow-to-raw *after* destroying the Box
RalfJung May 23, 2019
8d4e7fd
adjust comment
RalfJung May 23, 2019
4ba144d
Update associated_item_def_ids
Zoxc Nov 30, 2018
8c936e4
Update inherent_impls
Zoxc Nov 30, 2018
99f6221
Update borrowck
Zoxc Nov 30, 2018
95dfd82
Update upstream_monomorphizations and upstream_monomorphizations_for
Zoxc Nov 30, 2018
093940d
Update implementations_of_trait and all_trait_implementations
Zoxc Nov 30, 2018
529aed8
Update resolve_lifetimes, named_region_map, is_late_bound_map and obj…
Zoxc Nov 30, 2018
b1398a0
Update item_children
Zoxc Nov 30, 2018
28482db
Update used_trait_imports
Zoxc Nov 30, 2018
ba5d9c0
Optimize alloc_from_iter
Zoxc Apr 23, 2019
ae8975c
Update GenericPredicates queries
Zoxc Dec 1, 2018
e77096b
Remove subtle Default impl for Value
Zoxc Apr 5, 2019
4214565
Add a comment for arena_types!
Zoxc May 19, 2019
ad2b35b
Make ArenaField private
Zoxc May 19, 2019
5bcc80b
Update Cargo.lock
Zoxc May 19, 2019
9dcc60b
Update lint_levels
Zoxc Nov 30, 2018
10ef70b
Update stability_index, all_crate_nums and features_query
Zoxc Nov 30, 2018
5751fcc
Update all_traits
Zoxc Nov 30, 2018
fb57879
Update privacy_access_levels
Zoxc Dec 1, 2018
5f808f6
Update in_scope_traits_map
Zoxc Dec 1, 2018
9b648f7
Update upvars and module_exports
Zoxc Dec 1, 2018
46f2511
Update wasm_import_module_map and target_features_whitelist
Zoxc Dec 1, 2018
3f87975
Update get_lib_features, defined_lib_features, get_lang_items, define…
Zoxc Dec 1, 2018
2f74d90
Update visible_parent_map
Zoxc Dec 1, 2018
469831f
Update foreign_modules and dllimport_foreign_items
Zoxc Dec 1, 2018
a58999c
Update dylib_dependency_formats, extern_crate and reachable_non_generics
Zoxc Dec 1, 2018
d46e732
Update crate_variances and inferred_outlives_crate
Zoxc May 20, 2019
7fbbcfa
Add regression test for negative case
estebank May 23, 2019
49f01d8
Fix missing overflowing literal lint in for loop
varkor May 23, 2019
3e4cefe
Update unreachable loop patterns test
varkor May 23, 2019
12de24c
Add test for denying overflowing literal in loop
varkor May 23, 2019
e0e9c86
Rollup merge of #59545 - Zoxc:the-arena-3, r=eddyb,michaelwoerister
Centril May 23, 2019
b9459e7
Rollup merge of #61054 - estebank:mut-ref-reassign, r=zackmdavis
Centril May 23, 2019
26f3528
Rollup merge of #61056 - euclio:custom-discriminant-error, r=estebank
Centril May 23, 2019
ee97210
Rollup merge of #61082 - RalfJung:vec, r=alexcrichton
Centril May 23, 2019
3388028
Rollup merge of #61086 - RalfJung:box, r=alexcrichton
Centril May 23, 2019
92fda92
Rollup merge of #61098 - varkor:fix-overflowing-literal-in-loop, r=es…
Centril May 23, 2019
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
Prev Previous commit
Next Next commit
Update borrowck
  • Loading branch information
Zoxc committed May 23, 2019
commit 99f6221bb6d8ec9cf98f0946ed93a345b4a0e4c0
1 change: 1 addition & 0 deletions src/librustc/arena.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ macro_rules! arena_types {
rustc::infer::canonical::QueryResponse<'tcx, rustc::ty::Ty<'tcx>>
>,
[few] crate_inherent_impls: rustc::ty::CrateInherentImpls,
[decode] borrowck: rustc::middle::borrowck::BorrowCheckResult,
], $tcx);
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ rustc_queries! {
}

BorrowChecking {
query borrowck(_: DefId) -> Lrc<BorrowCheckResult> {}
query borrowck(_: DefId) -> &'tcx BorrowCheckResult {}

/// Borrow-checks the function body. If this is a closure, returns
/// additional requirements that the closure's creator must verify.
Expand Down
7 changes: 3 additions & 4 deletions src/librustc_borrowck/borrowck/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ use std::borrow::Cow;
use std::cell::{Cell, RefCell};
use std::fmt;
use std::rc::Rc;
use rustc_data_structures::sync::Lrc;
use std::hash::{Hash, Hasher};
use syntax::source_map::CompilerDesugaringKind;
use syntax_pos::{MultiSpan, Span};
Expand Down Expand Up @@ -75,7 +74,7 @@ pub struct AnalysisData<'a, 'tcx: 'a> {
}

fn borrowck<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, owner_def_id: DefId)
-> Lrc<BorrowCheckResult>
-> &'tcx BorrowCheckResult
{
assert!(tcx.use_ast_borrowck() || tcx.migrate_borrowck());

Expand All @@ -89,7 +88,7 @@ fn borrowck<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, owner_def_id: DefId)
// those things (notably the synthesized constructors from
// tuple structs/variants) do not have an associated body
// and do not need borrowchecking.
return Lrc::new(BorrowCheckResult {
return tcx.arena.alloc(BorrowCheckResult {
used_mut_nodes: Default::default(),
signalled_any_error: SignalledError::NoErrorsSeen,
})
Expand Down Expand Up @@ -136,7 +135,7 @@ fn borrowck<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, owner_def_id: DefId)
check_loans::check_loans(&mut bccx, &loan_dfcx, &flowed_moves, &all_loans, body);
}

Lrc::new(BorrowCheckResult {
tcx.arena.alloc(BorrowCheckResult {
used_mut_nodes: bccx.used_mut_nodes.into_inner(),
signalled_any_error: bccx.signalled_any_error.into_inner(),
})
Expand Down