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
25 commits
Select commit Hold shift + click to select a range
5e92625
Correctly check for opaque types in `assoc_ty_def`
matthewjasper Jan 4, 2020
088a180
Add suggestions when encountering chained comparisons
varkor Jan 11, 2020
7ba25ac
Revert "Rollup merge of #67727 - Dylan-DPC:stabilise/remove_item, r=a…
tesuji Jan 10, 2020
3a2af32
canonicalize some lint imports
Centril Jan 5, 2020
b93addb
move in_derive_expansion as Span method
Centril Jan 9, 2020
c151782
reduce diversity in linting methods
Centril Jan 9, 2020
6f1a79c
GlobalCtxt: Erase `LintStore` type.
Centril Jan 9, 2020
03bdfe9
move logic to LintLevelsBuilder
Centril Jan 9, 2020
f577b44
move LintSource to levels
Centril Jan 9, 2020
eee84fe
move struct_lint_level to levels.rs
Centril Jan 9, 2020
16bf278
inline maybe_lint_level_root
Centril Jan 9, 2020
03dfa64
lints: promote levels.rs to lint.rs & extract passes.rs
Centril Jan 9, 2020
8c12c42
{rustc::lint -> rustc_lint}::internal
Centril Jan 9, 2020
f58db20
move rustc::lint::{context, passes} to rustc_lint.
Centril Jan 9, 2020
b592359
lints: move a comment
Centril Jan 9, 2020
8be2a04
pacify the parallel compiler
Centril Jan 9, 2020
51078ce
fix ui-fulldeps & tests fallout
Centril Jan 10, 2020
c5a9a14
Constify alloc::Layout
lukaslueg Dec 31, 2019
0e1cd59
Galloping search for binary_search_util
llogiq Jan 6, 2020
019790c
Rollup merge of #67494 - lukaslueg:const_alloc, r=oli-obk
Centril Jan 12, 2020
1d9c69f
Rollup merge of #67867 - matthewjasper:opaque-assoc-lookup, r=oli-obk
Centril Jan 12, 2020
1b208b1
Rollup merge of #67948 - llogiq:gallop, r=Mark-Simulacrum
Centril Jan 12, 2020
cc51d03
Rollup merge of #68045 - Centril:liberate-lints, r=Mark-Simulacrum
Centril Jan 12, 2020
bbd210e
Rollup merge of #68089 - lzutao:revert-remote_item, r=sfackler
Centril Jan 12, 2020
82c19b4
Rollup merge of #68108 - varkor:chained-comparison-suggestions, r=Cen…
Centril Jan 12, 2020
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
pacify the parallel compiler
  • Loading branch information
Centril committed Jan 11, 2020
commit 8be2a04c7e6bf78a614840dc7152990a451ac4e0
5 changes: 3 additions & 2 deletions src/librustc/ty/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ use crate::ty::{ExistentialPredicate, InferTy, ParamTy, PolyFnSig, Predicate, Pr
use crate::ty::{InferConst, ParamConst};
use crate::ty::{List, TyKind, TyS};
use crate::util::common::ErrorReported;
use rustc_data_structures::sync;
use rustc_hir as hir;
use rustc_hir::def::{DefKind, Res};
use rustc_hir::def_id::{CrateNum, DefId, DefIdMap, DefIdSet, DefIndex, LOCAL_CRATE};
Expand Down Expand Up @@ -951,7 +952,7 @@ pub struct GlobalCtxt<'tcx> {
///
/// FIXME(Centril): consider `dyn LintStoreMarker` once
/// we can upcast to `Any` for some additional type safety.
pub lint_store: Lrc<dyn Any>,
pub lint_store: Lrc<dyn Any + sync::Sync + sync::Send>,

pub dep_graph: DepGraph,

Expand Down Expand Up @@ -1120,7 +1121,7 @@ impl<'tcx> TyCtxt<'tcx> {
/// reference to the context, to allow formatting values that need it.
pub fn create_global_ctxt(
s: &'tcx Session,
lint_store: Lrc<dyn Any>,
lint_store: Lrc<dyn Any + sync::Send + sync::Sync>,
local_providers: ty::query::Providers<'tcx>,
extern_providers: ty::query::Providers<'tcx>,
arenas: &'tcx AllArenas,
Expand Down
4 changes: 3 additions & 1 deletion src/librustc_lint/late.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ use syntax::ast;
use syntax::walk_list;

use log::debug;
use std::any::Any;
use std::slice;

/// Extract the `LintStore` from the query context.
/// This function exists because we've erased `LintStore` as `dyn Any` in the context.
crate fn unerased_lint_store<'tcx>(tcx: TyCtxt<'tcx>) -> &'tcx LintStore {
tcx.lint_store.downcast_ref().unwrap()
let store: &dyn Any = &*tcx.lint_store;
store.downcast_ref().unwrap()
}

macro_rules! lint_callback { ($cx:expr, $f:ident, $($args:expr),*) => ({
Expand Down