about summary refs log tree commit diff
path: root/src/libsyntax/print
AgeCommit message (Collapse)AuthorLines
2016-02-11remove unit test that can't be tested anymoreOliver Schneider-8/+0
2016-02-11[breaking-change] remove the sign from integer literals in the astOliver Schneider-10/+2
2016-02-11[breaking-change] don't glob export ast::{UintTy, IntTy} variantsOliver Schneider-2/+2
2016-02-11[breaking-change] don't glob export ast::Expr_ variantsOliver Schneider-48/+48
2016-02-11[breaking-change] don't glob export ast::ExplicitSelf_ variantsOliver Schneider-12/+12
2016-02-11[breaking-change] don't glob export ast::Decl_ variantsOliver Schneider-2/+2
2016-02-11[breaking-change] don't glob export ast::CaptureClause variantsOliver Schneider-3/+3
2016-02-11[breaking-change] don't glob import/export syntax::abi enum variantsOliver Schneider-8/+8
2016-02-11[breaking-change] don't glob export ast::BlockCheckMode variantsOliver Schneider-4/+4
2016-02-11[breaking-change] don't glob import ast::FunctionRetTy variantsOliver Schneider-11/+11
2016-01-28libsyntax: fix pretty printing of macro with bracesTomasz Miąsko-5/+2
Pretty printing of macro with braces but without terminated semicolon removed more boxes from stack than it put there, resulting in panic. This fixes the issue #30731.
2016-01-26Auto merge of #31120 - alexcrichton:attribute-deny-warnings, r=brsonbors-1/+0
This commit removes the `-D warnings` flag being passed through the makefiles to all crates to instead be a crate attribute. We want these attributes always applied for all our standard builds, and this is more amenable to Cargo-based builds as well. Note that all `deny(warnings)` attributes are gated with a `cfg(stage0)` attribute currently to match the same semantics we have today
2016-01-26Fix warnings during testsAlex Crichton-1/+0
The deny(warnings) attribute is now enabled for tests so we need to weed out these warnings as well.
2016-01-25Fix pretty_printer to print omitted type `_` markernxnfufunezn-8/+8
2015-12-30Auto merge of #30526 - Ms2ger:PathParameters, r=brsonbors-2/+2
2015-12-23Minor fix to whitespace in libsyntaxErick Tryzelaar-2/+2
2015-12-22Stop re-exporting PathParameters's variants.Ms2ger-2/+2
2015-12-21Auto merge of #30460 - Ms2ger:BindingMode, r=alexcrichtonbors-4/+4
2015-12-20Stop re-exporting the ast::BindingMode variants.Ms2ger-4/+4
2015-12-19Auto merge of #30184 - petrochenkov:ascr, r=nikomatsakisbors-1/+6
This PR is a rebase of the original PR by @eddyb https://github.com/rust-lang/rust/pull/21836 with some unrebasable parts manually reapplied, feature gate added + type equality restriction added as described below. This implementation is partial because the type equality restriction is applied to all type ascription expressions and not only those in lvalue contexts. Thus, all difficulties with detection of these contexts and translation of coercions having effect in runtime are avoided. So, you can't write things with coercions like `let slice = &[1, 2, 3]: &[u8];`. It obviously makes type ascription less useful than it should be, but it's still much more useful than not having type ascription at all. In particular, things like `let v = something.iter().collect(): Vec<_>;` and `let u = t.into(): U;` work as expected and I'm pretty happy with these improvements alone. Part of https://github.com/rust-lang/rust/issues/23416
2015-12-18Rollup merge of #30420 - petrochenkov:owned2, r=nrcManish Goregaokar-3/+2
Part of https://github.com/rust-lang/rust/pull/30095 not causing mysterious segfaults. r? @nrc
2015-12-18Deprecate name `OwnedSlice` and don't use itVadim Petrochenkov-3/+2
2015-12-17move error handling from libsyntax/diagnostics.rs to libsyntax/errors/*Nick Cameron-3/+3
Also split out emitters into their own module.
2015-12-16Implement type ascription.Eduard Burtescu-1/+6
2015-12-16Rollup merge of #30388 - DanielJCampbell:macro-ident-spans, r=nrcManish Goregaokar-1/+1
r? @nrc
2015-12-15Generated code spans now point to callsite parameters (where applicable)Daniel Campbell-1/+1
2015-12-14[breaking-change] move ast_util functions to methodsfaineance-10/+9
2015-12-14Auto merge of #29735 - Amanieu:asm_indirect_constraint, r=pnkfelixbors-5/+5
This PR reverts #29543 and instead implements proper support for "=*m" and "+*m" indirect output operands. This provides a framework on top of which support for plain memory operands ("m", "=m" and "+m") can be implemented. This also fixes the liveness analysis pass not handling read/write operands correctly.
2015-12-05std: Stabilize APIs for the 1.6 releaseAlex Crichton-7/+5
This commit is the standard API stabilization commit for the 1.6 release cycle. The list of issues and APIs below have all been through their cycle-long FCP and the libs team decisions are listed below Stabilized APIs * `Read::read_exact` * `ErrorKind::UnexpectedEof` (renamed from `UnexpectedEOF`) * libcore -- this was a bit of a nuanced stabilization, the crate itself is now marked as `#[stable]` and the methods appearing via traits for primitives like `char` and `str` are now also marked as stable. Note that the extension traits themeselves are marked as unstable as they're imported via the prelude. The `try!` macro was also moved from the standard library into libcore to have the same interface. Otherwise the functions all have copied stability from the standard library now. * The `#![no_std]` attribute * `fs::DirBuilder` * `fs::DirBuilder::new` * `fs::DirBuilder::recursive` * `fs::DirBuilder::create` * `os::unix::fs::DirBuilderExt` * `os::unix::fs::DirBuilderExt::mode` * `vec::Drain` * `vec::Vec::drain` * `string::Drain` * `string::String::drain` * `vec_deque::Drain` * `vec_deque::VecDeque::drain` * `collections::hash_map::Drain` * `collections::hash_map::HashMap::drain` * `collections::hash_set::Drain` * `collections::hash_set::HashSet::drain` * `collections::binary_heap::Drain` * `collections::binary_heap::BinaryHeap::drain` * `Vec::extend_from_slice` (renamed from `push_all`) * `Mutex::get_mut` * `Mutex::into_inner` * `RwLock::get_mut` * `RwLock::into_inner` * `Iterator::min_by_key` (renamed from `min_by`) * `Iterator::max_by_key` (renamed from `max_by`) Deprecated APIs * `ErrorKind::UnexpectedEOF` (renamed to `UnexpectedEof`) * `OsString::from_bytes` * `OsStr::to_cstring` * `OsStr::to_bytes` * `fs::walk_dir` and `fs::WalkDir` * `path::Components::peek` * `slice::bytes::MutableByteVector` * `slice::bytes::copy_memory` * `Vec::push_all` (renamed to `extend_from_slice`) * `Duration::span` * `IpAddr` * `SocketAddr::ip` * `Read::tee` * `io::Tee` * `Write::broadcast` * `io::Broadcast` * `Iterator::min_by` (renamed to `min_by_key`) * `Iterator::max_by` (renamed to `max_by_key`) * `net::lookup_addr` New APIs (still unstable) * `<[T]>::sort_by_key` (added to mirror `min_by_key`) Closes #27585 Closes #27704 Closes #27707 Closes #27710 Closes #27711 Closes #27727 Closes #27740 Closes #27744 Closes #27799 Closes #27801 cc #27801 (doesn't close as `Chars` is still unstable) Closes #28968
2015-12-05Use a struct instead of a tuple for inline asm output operandsAmanieu d'Antras-5/+5
2015-12-05Add proper support for indirect output constraints in inline asmAmanieu d'Antras-1/+1
2015-11-26Some TLC for the MoveMap traitMarvin Löbel-2/+0
2015-11-26Moved and refactored ThinAttributesMarvin Löbel-5/+6
2015-11-26Add syntax support for attributes on expressions and all syntaxMarvin Löbel-84/+145
nodes in statement position. Extended #[cfg] folder to allow removal of statements, and of expressions in optional positions like expression lists and trailing block expressions. Extended lint checker to recognize lint levels on expressions and locals.
2015-11-23Avoid some code duplication around getting names of numeric types.Michael Woerister-3/+3
2015-11-17Auto merge of #29887 - sanxiyn:match-ref-pats, r=sfacklerbors-18/+18
2015-11-17Fix match_ref_pats flagged by ClippySeo Sanghyeon-18/+18
2015-11-16rename `ast::ImplItem_::*ImplItem` to `ast::ImplItemKind::*`Oliver Schneider-4/+4
2015-11-12Auto merge of #29780 - KyleMayes:quote-ext, r=nrcbors-0/+1
This is my first code contribution to Rust, so I'm sure there are some issues with the changes I've made. I've added the `quote_arg!`, `quote_block!`, `quote_path!`, and `quote_meta_item!` quasiquoting macros. From my experience trying to build AST in compiler plugins, I would like to be able to build any AST piece with a quasiquoting macro (e.g., `quote_struct_field!` or `quote_variant!`) and then use those AST pieces in other quasiquoting macros, but this pull request just adds some of the low-hanging fruit. I'm not sure if these additions are desirable, and I'm sure these macros can be implemented in an external crate if not.
2015-11-12libsyntax: deny warnings in doctestsKevin Butler-2/+4
2015-11-11libsyntax: Add more quasiquoting macrosKyle Mayes-0/+1
2015-11-06remove `Tt` prefix from TokenType variantsOliver Schneider-7/+7
[breaking change]
2015-10-31Remove PatWildMultiVadim Petrochenkov-8/+4
2015-10-27Generalise associative operator parsingSimonas Kazlauskas-6/+8
This commit generalises parsing of associative operators from left-associative only (with some ugly hacks to support right-associative assignment) to properly left/right-associative operators. Parsing still is not general enough to handle non-associative, non-highest-precedence prefix or non-highest-precedence postfix operators (e.g. `..` range syntax), though. That should be fixed in the future. Lastly, this commit adds support for parsing right-associative `<-` (left arrow) operator with precedence higher than assignment as the operator for placement-in feature.
2015-10-26Auto merge of #29274 - thepowersgang:issues-29107-const-unsafe-fn-order, ↵bors-1/+2
r=nikomatsakis This PR switches the implemented ordering from `unsafe const fn` (as was in the original RFC) to `const unsafe fn` (which is what the lang team decided on)
2015-10-25syntax/rustc_front: Simplify VariantData::fieldsVadim Petrochenkov-16/+2
And use VariantData instead of P<VariantData> in Item_ and Variant_
2015-10-25Switch to 'const unsafe fn' ordering (rust-lang/rust#29107)John Hodge-1/+2
2015-10-15Auto merge of #28980 - nrc:unsafe-macros, r=@pnkfelixbors-2/+2
This is a [breaking change]. @brson could you do a Crater run with this PR please? Lets not land till Crater says its OK. This was discussed at https://internals.rust-lang.org/t/does-anyone-use-the-push-pop-unsafe-macros/2702
2015-10-13Merge VariantData and VariantData_Vadim Petrochenkov-2/+1
2015-10-13Merge struct fields and struct kindVadim Petrochenkov-8/+19