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
35 commits
Select commit Hold shift + click to select a range
56ebfb1
Implement DoubleEndedIterator for iter::{StepBy, Peekable, Take}
timvermeulen Jun 2, 2019
3b15b16
Explaining the reason why validation is performed in to_str of path.rs
JasonShin Aug 1, 2019
1aa4a57
Update src/libstd/path.rs to shorten the explanation for .to_str vali…
JasonShin Aug 1, 2019
50b258b
diagnostics: Describe crate root modules in `DefKind::Mod` as "crate"
petrochenkov Aug 3, 2019
0d15845
fix UB in a test
RalfJung Aug 4, 2019
95f29aa
Revert "Rollup merge of #62696 - chocol4te:fix_#62194, r=estebank"
arielb1 Aug 4, 2019
4e51ef7
Test content, not value
RalfJung Aug 5, 2019
b5e35b1
remove special code path for unknown tokens
matklad Jul 30, 2019
58ac81a
add unknown token
matklad Jul 30, 2019
b3e8c8b
adapt rustdoc to infailable lexer
matklad Jul 30, 2019
ab3fb1e
Drop span argument from mk_list_item
Mark-Simulacrum Aug 4, 2019
24a491f
Drop explicit span argument from mk_name_value_item
Mark-Simulacrum Aug 4, 2019
8849149
Make mk_attr_id private to libsyntax
Mark-Simulacrum Aug 4, 2019
fbf93d4
Remove leftover AwaitOrigin
Mark-Simulacrum Aug 5, 2019
90b95cf
fix slice comparison
RalfJung Aug 5, 2019
288b4e9
Don't store &Span
Mark-Simulacrum Aug 5, 2019
1f01863
improve align_offset docs
RalfJung Aug 5, 2019
30910ee
Make qualify consts in_projection use PlaceRef
spastorino Aug 5, 2019
9058bf2
Make use of possibly uninitialized data a hard error
tmandry Aug 3, 2019
571e22d
Clarify align_to's requirements and obligations
shepmaster Aug 5, 2019
175eb9c
doc: fix broken sentence
tshepang Aug 6, 2019
1166e2a
Rollup merge of #61457 - timvermeulen:double_ended_iters, r=scottmcm
Centril Aug 6, 2019
ec1758d
Rollup merge of #63017 - matklad:no-fatal, r=petrochenkov
Centril Aug 6, 2019
e50ded6
Rollup merge of #63184 - JasonShin:master, r=sfackler
Centril Aug 6, 2019
3185305
Rollup merge of #63230 - tmandry:disallow-possibly-uninitialized, r=C…
Centril Aug 6, 2019
dc1b568
Rollup merge of #63250 - petrochenkov:descrate, r=davidtwco
Centril Aug 6, 2019
ce7128a
Rollup merge of #63260 - RalfJung:ptr-test, r=matklad
Centril Aug 6, 2019
0f26527
Rollup merge of #63264 - arielb1:revert-private-coherence-errors, r=e…
Centril Aug 6, 2019
4a9a3a2
Rollup merge of #63272 - Mark-Simulacrum:clean-attr, r=petrochenkov
Centril Aug 6, 2019
e1ee3eb
Rollup merge of #63285 - Mark-Simulacrum:rm-await-origin, r=Centril
Centril Aug 6, 2019
7462e55
Rollup merge of #63287 - Mark-Simulacrum:span-no-ref, r=Centril
Centril Aug 6, 2019
af7bfe8
Rollup merge of #63293 - shepmaster:align-to-doc, r=@RalfJung
Centril Aug 6, 2019
08a5bb8
Rollup merge of #63295 - RalfJung:align_offset, r=dtolnay
Centril Aug 6, 2019
2ead909
Rollup merge of #63299 - spastorino:in-projection-use-ref, r=oli-obk
Centril Aug 6, 2019
3bb4a53
Rollup merge of #63312 - tshepang:doc-fix, r=Centril
Centril Aug 6, 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
Drop span argument from mk_list_item
  • Loading branch information
Mark-Simulacrum committed Aug 5, 2019
commit ab3fb1e775ff20f80096953080dfc650950041b0
7 changes: 3 additions & 4 deletions src/librustc/hir/lowering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5176,11 +5176,10 @@ impl<'a> LoweringContext<'a> {
let attr = {
// `allow(unreachable_code)`
let allow = {
let allow_ident = Ident::with_empty_ctxt(sym::allow).with_span_pos(e.span);
let uc_ident = Ident::with_empty_ctxt(sym::unreachable_code)
.with_span_pos(e.span);
let allow_ident = Ident::new(sym::allow, e.span);
let uc_ident = Ident::new(sym::unreachable_code, e.span);
let uc_nested = attr::mk_nested_word_item(uc_ident);
attr::mk_list_item(e.span, allow_ident, vec![uc_nested])
attr::mk_list_item(allow_ident, vec![uc_nested])
};
attr::mk_attr_outer(allow)
};
Expand Down
4 changes: 2 additions & 2 deletions src/libsyntax/attr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,8 @@ pub fn mk_name_value_item(span: Span, ident: Ident, lit_kind: LitKind, lit_span:
MetaItem { path: Path::from_ident(ident), span, node: MetaItemKind::NameValue(lit) }
}

pub fn mk_list_item(span: Span, ident: Ident, items: Vec<NestedMetaItem>) -> MetaItem {
MetaItem { path: Path::from_ident(ident), span, node: MetaItemKind::List(items) }
pub fn mk_list_item(ident: Ident, items: Vec<NestedMetaItem>) -> MetaItem {
MetaItem { path: Path::from_ident(ident), span: ident.span, node: MetaItemKind::List(items) }
}

pub fn mk_word_item(ident: Ident) -> MetaItem {
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/ext/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ impl<'a> ExtCtxt<'a> {

pub fn meta_list(&self, sp: Span, name: ast::Name, mis: Vec<ast::NestedMetaItem>)
-> ast::MetaItem {
attr::mk_list_item(sp, Ident::new(name, sp), mis)
attr::mk_list_item(Ident::new(name, sp), mis)
}

pub fn meta_name_value(&self, span: Span, name: ast::Name, lit_kind: ast::LitKind)
Expand Down
4 changes: 2 additions & 2 deletions src/libsyntax/ext/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
];

let include_ident = Ident::with_empty_ctxt(sym::include);
let item = attr::mk_list_item(DUMMY_SP, include_ident, include_info);
let item = attr::mk_list_item(include_ident, include_info);
items.push(ast::NestedMetaItem::MetaItem(item));
}
Err(e) => {
Expand Down Expand Up @@ -1333,7 +1333,7 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
}
}

let meta = attr::mk_list_item(DUMMY_SP, Ident::with_empty_ctxt(sym::doc), items);
let meta = attr::mk_list_item(Ident::with_empty_ctxt(sym::doc), items);
*at = attr::Attribute {
span: at.span,
id: at.id,
Expand Down
5 changes: 2 additions & 3 deletions src/libsyntax/print/pprust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use crate::tokenstream::{self, TokenStream, TokenTree};

use rustc_target::spec::abi::{self, Abi};
use syntax_pos::{self, BytePos};
use syntax_pos::{DUMMY_SP, FileName, Span};
use syntax_pos::{FileName, Span};

use std::borrow::Cow;

Expand Down Expand Up @@ -124,8 +124,7 @@ pub fn print_crate<'a>(cm: &'a SourceMap,

// #![feature(prelude_import)]
let pi_nested = attr::mk_nested_word_item(ast::Ident::with_empty_ctxt(sym::prelude_import));
let list = attr::mk_list_item(
DUMMY_SP, ast::Ident::with_empty_ctxt(sym::feature), vec![pi_nested]);
let list = attr::mk_list_item(ast::Ident::with_empty_ctxt(sym::feature), vec![pi_nested]);
let fake_attr = attr::mk_attr_inner(list);
s.print_attribute(&fake_attr);

Expand Down
3 changes: 1 addition & 2 deletions src/libsyntax_ext/test_harness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ impl MutVisitor for EntryPointCleaner {
item.map(|ast::Item {id, ident, attrs, node, vis, span, tokens}| {
let allow_ident = Ident::with_empty_ctxt(sym::allow);
let dc_nested = attr::mk_nested_word_item(Ident::from_str("dead_code"));
let allow_dead_code_item = attr::mk_list_item(DUMMY_SP, allow_ident,
vec![dc_nested]);
let allow_dead_code_item = attr::mk_list_item(allow_ident, vec![dc_nested]);
let allow_dead_code = attr::mk_attr_outer(allow_dead_code_item);

ast::Item {
Expand Down