rust/src/libsyntax
bors 6b29a7d564 Auto merge of #24683 - P1start:help-suggestions, r=nrc
This PR uses the inline error suggestions introduced in #24242 to modify a few existing `help` messages. The new errors look like this:

    foobar.rs:5:12: 5:25 error: expected a path on the left-hand side of `+`,
                                not `&'static Copy` [E0178]
    foobar.rs:5     let x: &'static Copy + 'static;
                           ^~~~~~~~~~~~~
    foobar.rs:5:12: 5:35 help: try adding parentheses (per RFC 438):
    foobar.rs:      let x: &'static (Copy + 'static);


    foobar.rs:2:13: 2:23 error: cast to unsized type: `&_` as `core::marker::Copy`
    foobar.rs:2     let x = &1 as Copy;
                            ^~~~~~~~~~
    foobar.rs:2:19: 2:23 help: try casting to a reference instead:
    foobar.rs:      let x = &1 as &Copy;


    foobar.rs:7:24: 7:25 error: expected expression, found `;`
    foobar.rs:7     let x = box (1 + 1);
                                       ^
    foobar.rs:7:13: 7:16 help: try using `box()` instead:
    foobar.rs:      let x = box() (1 + 1);

This also modifies compiletest to give the ability to directly test suggestions given by error messages.
2015-04-23 02:45:06 +00:00
..
ast_map Expose visibility for fns in syntax::visit 2015-04-14 09:54:58 +12:00
diagnostics syntax: remove #[feature(quote, unsafe_destructor)] 2015-04-21 10:08:27 -07:00
ext syntax: Replace [].tail with the stable [1..] syntax 2015-04-21 10:08:27 -07:00
parse Auto merge of #24683 - P1start:help-suggestions, r=nrc 2015-04-23 02:45:06 +00:00
print syntax: Replace String::from_str with the stable String::from 2015-04-21 10:08:27 -07:00
util syntax: Copy unstable str::char_at into libsyntax 2015-04-21 10:23:53 -07:00
abi.rs Fallout in libsyntax 2015-04-01 11:22:39 -04:00
ast_util.rs syntax: Replace String::from_str with the stable String::from 2015-04-21 10:08:27 -07:00
ast.rs std: Remove deprecated/unstable num functionality 2015-04-21 11:37:43 -07:00
attr.rs Auto merge of #23011 - nagisa:the-war-of-symbol-and-symbol, r=pnkfelix 2015-04-12 01:26:53 +00:00
codemap.rs rollup merge of #24636: alexcrichton/remove-deprecated 2015-04-21 15:28:53 -07:00
config.rs syntax: Remove uses of #[feature(slice_patterns)] 2015-04-21 10:08:26 -07:00
diagnostic.rs syntax: Replace String::from_str with the stable String::from 2015-04-21 10:08:27 -07:00
feature_gate.rs Fix some documentation typos 2015-04-16 22:23:36 -04:00
fold.rs syntax: remove #![feature(box_syntax, box_patterns)] 2015-04-21 10:07:48 -07:00
lib.rs syntax: Copy unstable str::char_at into libsyntax 2015-04-21 10:23:53 -07:00
owned_slice.rs Switched to Box::new in many places. 2015-03-03 21:05:55 +01:00
ptr.rs syntax: remove #![feature(box_syntax, box_patterns)] 2015-04-21 10:07:48 -07:00
show_span.rs std: Stabilize FromStr and parse 2015-01-30 08:52:44 -08:00
std_inject.rs Unquote all crate names without underscores 2015-03-27 10:58:12 -07:00
str.rs syntax: Copy unstable str::char_at into libsyntax 2015-04-21 10:23:53 -07:00
test.rs Work towards a non-panicing parser (libsyntax) 2015-04-05 09:52:50 +01:00
visit.rs Expose visibility for fns in syntax::visit 2015-04-14 09:54:58 +12:00