rust/src/libsyntax
bors d4d43e2483 Auto merge of #48173 - GuillaumeGomez:error-codes-libsyntax_ext, r=estebank
Add error codes for libsyntax_ext

I intend to add error codes for `libsyntax_ext` as well. However, they cannot be used at stage 0 directly so I thought it might be possible to enable them at the stage 1 only so we can have access to the macros. However, the error code registration seems to not work this way. Currently I get the following error:

```
error: used diagnostic code E0660 not registered
  --> libsyntax_ext/asm.rs:93:25
   |
93 |                         span_err!(cx, sp, E0660, "malformed inline assembly");
   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: used diagnostic code E0661 not registered
   --> libsyntax_ext/asm.rs:151:33
    |
151 | /                                 span_err!(cx, sp, E0661,
152 | |                                           "output operand constraint lacks '=' or '+'");
    | |________________________________________________________________________________________^
    |
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: aborting due to 2 previous errors

error: Could not compile `syntax_ext`.
```

If anyone has an idea, I'd gladly take it. I'm trying to figure this out on my side as well. I also opened this PR to know if it was worth it to continue (maybe we don't want this?).

Anyway, any answer for both questions is very welcome!

cc @rust-lang/compiler
2018-04-15 01:26:11 +00:00
..
diagnostics Allow raw identifiers in diagnostic macros. 2018-03-18 13:27:56 -05:00
ext Add error codes for libsyntax_ext 2018-04-14 17:25:35 +02:00
parse Rollup merge of #49852 - alexcrichton:fix-more-proc-macros, r=nrc 2018-04-14 15:21:19 +08:00
print AST/HIR: Merge field access expressions for named and numeric fields 2018-04-12 23:02:09 +03:00
util AST/HIR: Merge field access expressions for named and numeric fields 2018-04-12 23:02:09 +03:00
abi.rs add thiscall calling convention support 2017-05-24 16:40:03 -04:00
ast.rs AST/HIR: Merge field access expressions for named and numeric fields 2018-04-12 23:02:09 +03:00
attr.rs Implementation of #[repr(packed(n))] RFC 1399. 2018-04-11 22:13:13 +10:00
build.rs rustc: Add some build scripts for librustc crates 2017-07-22 22:04:13 -07:00
Cargo.toml Remove syntax and syntax_pos thread locals 2018-03-14 11:56:01 +01:00
codemap.rs CodeMap functions refactored. 2018-03-18 20:46:29 -03:00
config.rs Rename ast::Variant_::name into ident + Fix rebase 2018-04-06 11:48:19 +03:00
diagnostic_list.rs Fix missed i128 feature gates 2018-03-26 08:37:56 -05:00
edition.rs Add easy edition feature flag 2018-03-29 08:44:21 +02:00
entry.rs Cleanup InternedString. 2016-11-21 09:00:56 +00:00
feature_gate.rs Implement inferring outlives requirements for references, structs, enum, union, and projection types. added a feature gate and tests for these scenarios. 2018-04-12 13:52:06 -04:00
fold.rs AST/HIR: Merge field access expressions for named and numeric fields 2018-04-12 23:02:09 +03:00
json.rs Require the code mapper to be thread-safe 2018-03-15 00:43:03 +01:00
lib.rs Auto merge of #49698 - SimonSapin:unicode-for-everyone, r=alexcrichton 2018-04-12 00:35:33 +00:00
ptr.rs syntax: Rename P::unwrap into P::into_inner 2017-12-17 02:21:29 +03:00
README.md Replace many of the last references to readmes 2018-03-16 12:43:22 -05:00
show_span.rs use field init shorthand EVERYWHERE 2017-08-15 15:29:17 -07:00
std_inject.rs Inject the compiler_builtins crate whenever the core crate is injected 2018-04-07 09:24:35 +02:00
str.rs syntax: Copy unstable str::char_at into libsyntax 2015-04-21 10:23:53 -07:00
test.rs Use Ident instead of Name in MetaItem 2018-04-06 11:52:16 +03:00
test_snippet.rs Remove syntax and syntax_pos thread locals 2018-03-14 11:56:01 +01:00
tokenstream.rs proc_macro: Avoid cached TokenStream more often 2018-04-10 13:05:13 -07:00
visit.rs AST/HIR: Merge field access expressions for named and numeric fields 2018-04-12 23:02:09 +03:00

The syntax crate contains those things concerned purely with syntax that is, the AST ("abstract syntax tree"), parser, pretty-printer, lexer, macro expander, and utilities for traversing ASTs.

For more information about how these things work in rustc, see the rustc guide: