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

Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
47a443c
Duplicate lint specifications are always bug!
Mark-Simulacrum Sep 24, 2019
577d442
De-propagate optional session from lint registration
Mark-Simulacrum Sep 24, 2019
2121b04
Handle lints, not passes in push_lints
Mark-Simulacrum Sep 24, 2019
748eccd
Lints being from a plugin is dependent on the lint, not the registration
Mark-Simulacrum Oct 7, 2019
b060f3b
Split module and crate late pass registration
Mark-Simulacrum Oct 7, 2019
e1079c8
Split out just registration to separate function
Mark-Simulacrum Oct 7, 2019
68c07db
No longer implicitly register lints when registering passes
Mark-Simulacrum Oct 7, 2019
7fef397
Make get_lints be a static function
Mark-Simulacrum Oct 7, 2019
2454512
Take lint passes as constructor functions
Mark-Simulacrum Oct 7, 2019
aa4ee2c
Move to storing constructor functions inside LintStore
Mark-Simulacrum Oct 7, 2019
c1abc30
Make declare_lint take any amount of boolean fields
Mark-Simulacrum Oct 8, 2019
7abb1fa
Remove side table of future incompatibility info
Mark-Simulacrum Oct 9, 2019
c4475c7
Access future incompatibility information directly
Mark-Simulacrum Oct 9, 2019
da56d1d
Remove all borrows of lint store from Session from librustc
Mark-Simulacrum Oct 9, 2019
dab3bd6
Create lint store during plugin registration
Mark-Simulacrum Oct 9, 2019
b761367
Fix test fallout
Mark-Simulacrum Oct 9, 2019
6be0a70
Update API to be more compatible with plugin needs
Mark-Simulacrum Oct 10, 2019
c290293
Derive `Rustc{En,De}codable` for `TokenStream`.
nnethercote Oct 15, 2019
02edd14
Convert some `InternedString`s to `Symbols`.
nnethercote Oct 18, 2019
c325553
Convert `InternedString`s to `Symbols` in `UnsafetyViolation`.
nnethercote Oct 18, 2019
78c3427
Remove unnecessary `impl Clean<String> for InternedString`.
nnethercote Oct 19, 2019
ddc1c27
Eliminate `intersect_opt`.
nnethercote Sep 19, 2019
b8214e9
Convert fields within `DefPathData` from `InternedString` to `Symbol`.
nnethercote Oct 21, 2019
dddacf1
Change `SymbolName::name` from `InternedString` to `Symbol`.
nnethercote Oct 21, 2019
2da7a9c
Use `Symbol` for codegen unit names.
nnethercote Oct 21, 2019
08e2f05
Remove `InternedString`.
nnethercote Oct 21, 2019
33910f9
Deprecated proc_macro doesn't trigger warning on build library
XiangQingW Oct 21, 2019
c027be0
Deprecated proc_macro doesn't trigger warning on build library
XiangQingW Oct 21, 2019
ed965f1
Update E0659 error code long explanation to 2018 edition
GuillaumeGomez Oct 22, 2019
74db3e8
rustc_metadata: use a table for super_predicates.
eddyb Oct 18, 2019
7a80a11
rustc_metadata: use a table for fn_sig.
eddyb Oct 18, 2019
371cc39
rustc_metadata: use a table for impl_trait_ref.
eddyb Oct 18, 2019
fe84809
relax ExactSizeIterator bound on write_bytes: too many iterators don'…
RalfJung Oct 22, 2019
4e8d1b2
Add some documentation
Mark-Simulacrum Oct 22, 2019
eeb549b
Add Cow::is_borrowed and Cow::is_owned
Oct 5, 2019
360cdf4
Rollup merge of #65144 - clarfon:moo, r=sfackler
Centril Oct 23, 2019
2cb7d20
Rollup merge of #65193 - Mark-Simulacrum:lockless-lintstore, r=nikoma…
Centril Oct 23, 2019
d41bf54
Rollup merge of #65583 - eddyb:more-query-like-cross-crate-tables, r=…
Centril Oct 23, 2019
dd47daf
Rollup merge of #65641 - nnethercote:derive-TokenStream-Encodable-Dec…
Centril Oct 23, 2019
d8015f6
Rollup merge of #65648 - nnethercote:rm-intersect_opt, r=nikomatsakis
Centril Oct 23, 2019
c020d64
Rollup merge of #65657 - nnethercote:rm-InternedString-properly, r=eddyb
Centril Oct 23, 2019
cea5879
Rollup merge of #65666 - XiangQingW:proc_macro, r=petrochenkov
Centril Oct 23, 2019
9bcebab
Rollup merge of #65691 - GuillaumeGomez:2018-edition-E0659, r=Dylan-DPC
Centril Oct 23, 2019
fe3eb32
Rollup merge of #65704 - RalfJung:exact-size, r=oli-obk
Centril Oct 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
Convert InternedStrings to Symbols in UnsafetyViolation.
  • Loading branch information
nnethercote committed Oct 21, 2019
commit c325553a30ec0de8e156c28533e55ddee71013f0
6 changes: 3 additions & 3 deletions src/librustc/mir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use std::slice;
use std::vec::IntoIter;
use std::{iter, mem, option, u32};
use syntax::ast::Name;
use syntax::symbol::{InternedString, Symbol};
use syntax::symbol::Symbol;
use syntax_pos::{Span, DUMMY_SP};

pub use crate::mir::interpret::AssertMessage;
Expand Down Expand Up @@ -2736,8 +2736,8 @@ pub enum UnsafetyViolationKind {
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, HashStable)]
pub struct UnsafetyViolation {
pub source_info: SourceInfo,
pub description: InternedString,
pub details: InternedString,
pub description: Symbol,
pub details: Symbol,
pub kind: UnsafetyViolationKind,
}

Expand Down
27 changes: 13 additions & 14 deletions src/librustc_mir/transform/check_unsafety.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use rustc::lint::builtin::{SAFE_EXTERN_STATICS, SAFE_PACKED_BORROWS, UNUSED_UNSA
use rustc::mir::*;
use rustc::mir::visit::{PlaceContext, Visitor, MutatingUseContext};

use syntax::symbol::{InternedString, sym};
use syntax::symbol::{Symbol, sym};

use std::ops::Bound;

Expand Down Expand Up @@ -167,9 +167,8 @@ impl<'a, 'tcx> Visitor<'tcx> for UnsafetyChecker<'a, 'tcx> {
(CastTy::FnPtr, CastTy::Int(_)) => {
self.register_violations(&[UnsafetyViolation {
source_info: self.source_info,
description: InternedString::intern("cast of pointer to int"),
details: InternedString::intern(
"casting pointers to integers in constants"),
description: Symbol::intern("cast of pointer to int"),
details: Symbol::intern("casting pointers to integers in constants"),
kind: UnsafetyViolationKind::General,
}], &[]);
},
Expand All @@ -185,8 +184,8 @@ impl<'a, 'tcx> Visitor<'tcx> for UnsafetyChecker<'a, 'tcx> {
if let ty::RawPtr(_) | ty::FnPtr(..) = lhs.ty(self.body, self.tcx).kind {
self.register_violations(&[UnsafetyViolation {
source_info: self.source_info,
description: InternedString::intern("pointer operation"),
details: InternedString::intern("operations on pointers in constants"),
description: Symbol::intern("pointer operation"),
details: Symbol::intern("operations on pointers in constants"),
kind: UnsafetyViolationKind::General,
}], &[]);
}
Expand Down Expand Up @@ -219,8 +218,8 @@ impl<'a, 'tcx> Visitor<'tcx> for UnsafetyChecker<'a, 'tcx> {
self.source_scope_local_data[source_info.scope].lint_root;
self.register_violations(&[UnsafetyViolation {
source_info,
description: InternedString::intern("use of extern static"),
details: InternedString::intern(
description: Symbol::intern("use of extern static"),
details: Symbol::intern(
"extern statics are not controlled by the Rust type system: \
invalid data, aliasing violations or data races will cause \
undefined behavior"),
Expand All @@ -240,8 +239,8 @@ impl<'a, 'tcx> Visitor<'tcx> for UnsafetyChecker<'a, 'tcx> {
self.source_scope_local_data[source_info.scope].lint_root;
self.register_violations(&[UnsafetyViolation {
source_info,
description: InternedString::intern("borrow of packed field"),
details: InternedString::intern(
description: Symbol::intern("borrow of packed field"),
details: Symbol::intern(
"fields of packed structs might be misaligned: dereferencing a \
misaligned pointer or even just creating a misaligned reference \
is undefined behavior"),
Expand Down Expand Up @@ -334,8 +333,8 @@ impl<'a, 'tcx> UnsafetyChecker<'a, 'tcx> {
let source_info = self.source_info;
self.register_violations(&[UnsafetyViolation {
source_info,
description: InternedString::intern(description),
details: InternedString::intern(details),
description: Symbol::intern(description),
details: Symbol::intern(details),
kind,
}], &[]);
}
Expand Down Expand Up @@ -438,8 +437,8 @@ impl<'a, 'tcx> UnsafetyChecker<'a, 'tcx> {
let source_info = self.source_info;
self.register_violations(&[UnsafetyViolation {
source_info,
description: InternedString::intern(description),
details: InternedString::intern(details),
description: Symbol::intern(description),
details: Symbol::intern(details),
kind: UnsafetyViolationKind::GeneralAndConstFn,
}], &[]);
}
Expand Down