rust/src
Zack M. Davis 3986c96448 enum type instead of variant suggestion unification
Weirdly, we were deciding between a help note and a structured
suggestion based on whether the import candidate span was a dummy—but
we weren't using that span in any case! The dummy-ness of the span
(which appears to be a matter of this-crate vs. other-crate
definition) isn't the right criterion by which we should decide
whether it's germane to mention that "there is an enum variant";
instead, let's use the someness of `def` (which is used as the
`has_unexpected_resolution` argument to `error_code`).

Since `import_candidate_to_paths` has no other callers, we are free to
stop returning the span and rename the function. By using
`span_suggestions_`, we leverage the max-suggestions output limit
already built in to the emitter, thus resolving #56028.

In the matter of message wording, "you can" is redundant (and perhaps
too informal); prefer the imperative.
2018-12-22 17:40:48 -08:00
..
bootstrap Rollup merge of #56947 - hsivonen:neon, r=alexcrichton 2018-12-19 11:47:20 +01:00
build_helper std: Depend directly on crates.io crates 2018-12-11 21:08:22 -08:00
ci Rollup merge of #56947 - hsivonen:neon, r=alexcrichton 2018-12-19 11:47:20 +01:00
doc Fixes broken links 2018-12-14 10:40:08 +01:00
etc Disable btree pretty-printers on older gdbs 2018-12-12 15:18:08 -07:00
grammar syntax: Rename some keywords 2018-12-04 00:30:27 +03:00
liballoc Auto merge of #56842 - scottmcm:vecdeque-rotate, r=alexcrichton 2018-12-22 07:16:11 +00:00
libarena Auto merge of #56378 - ljedrz:arena_tweaks, r=nagisa 2018-12-02 11:14:14 +00:00
libbacktrace@f4d02bbdbf
libcore Stabilize Rc, Arc and Pin as method receivers 2018-12-20 01:14:01 -05:00
libfmt_macros
libgraphviz Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
libpanic_abort std: Depend directly on crates.io crates 2018-12-11 21:08:22 -08:00
libpanic_unwind std: Depend directly on crates.io crates 2018-12-11 21:08:22 -08:00
libproc_macro proc_macro: Validate tokens coming from the compiler again 2018-12-19 23:17:53 +03:00
libprofiler_builtins std: Depend directly on crates.io crates 2018-12-11 21:08:22 -08:00
librustc Auto merge of #56887 - emilio:enum-field-reordering, r=eddyb 2018-12-22 20:35:30 +00:00
librustc_allocator Upgrade smallvec to 0.6.7 and use the new may_dangle feature. 2018-12-10 09:31:27 +11:00
librustc_apfloat Upgrade smallvec to 0.6.7 and use the new may_dangle feature. 2018-12-10 09:31:27 +11:00
librustc_asan std: Depend directly on crates.io crates 2018-12-11 21:08:22 -08:00
librustc_borrowck Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
librustc_codegen_llvm Auto merge of #56397 - petrhosek:file-search, r=cramertj 2018-12-19 06:46:15 +00:00
librustc_codegen_ssa treat ref-to-raw cast like a reborrow: do a special kind of retag 2018-12-18 09:56:31 +01:00
librustc_codegen_utils Auto merge of #56578 - alexreg:cosmetic-1, r=alexreg 2018-12-08 03:50:16 +00:00
librustc_cratesio_shim Statically link proc_macro into proc macros. 2018-11-30 06:15:20 +02:00
librustc_data_structures Tweak query code for performance 2018-12-17 08:53:01 +01:00
librustc_driver Auto merge of #56813 - oli-obk:main_🧶, r=pnkfelix 2018-12-21 10:46:11 +00:00
librustc_errors Bump to 1.33.0 2018-12-12 08:09:26 -08:00
librustc_fs_util Rename conversion util; remove duplicate util in librustc_codegen_llvm. 2018-11-29 08:09:28 -05:00
librustc_incremental Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
librustc_lint Rollup merge of #56689 - QuietMisdreavus:rustdoc-lint-group, r=pnkfelix 2018-12-19 11:47:07 +01:00
librustc_llvm Bump to 1.33.0 2018-12-12 08:09:26 -08:00
librustc_lsan std: Depend directly on crates.io crates 2018-12-11 21:08:22 -08:00
librustc_metadata Remove Session::sysroot(). 2018-12-12 10:36:15 +11:00
librustc_mir Auto merge of #54125 - varkor:less-conservative-uninhabitedness-check, r=nikomatsakis 2018-12-20 22:04:21 +00:00
librustc_msan std: Depend directly on crates.io crates 2018-12-11 21:08:22 -08:00
librustc_passes Rollup merge of #56343 - yui-knk:remove_mir_stats_mod, r=nikomatsakis 2018-12-16 14:08:15 +01:00
librustc_platform_intrinsics
librustc_plugin Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
librustc_privacy Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
librustc_resolve enum type instead of variant suggestion unification 2018-12-22 17:40:48 -08:00
librustc_save_analysis Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
librustc_target Rollup merge of #56947 - hsivonen:neon, r=alexcrichton 2018-12-19 11:47:20 +01:00
librustc_traits add coherence future-compat warnings for marker-only trait objects 2018-12-14 19:14:22 +02:00
librustc_tsan std: Depend directly on crates.io crates 2018-12-11 21:08:22 -08:00
librustc_typeck Auto merge of #56805 - mikeyhew:stabilize-pin-as-receiver, r=nikomatsakis 2018-12-22 01:42:25 +00:00
librustdoc Auto merge of #56824 - euclio:internal-apis, r=QuietMisdreavus 2018-12-22 04:21:30 +00:00
libserialize Bump to 1.33.0 2018-12-12 08:09:26 -08:00
libstd Auto merge of #56779 - adrian-budau:master, r=alexcrichton 2018-12-21 20:08:11 +00:00
libsyntax Auto merge of #56647 - petrochenkov:dcrate2, r=alexcrichton 2018-12-20 12:42:54 +00:00
libsyntax_ext proc_macro: Accept $crate as an identifier if it comes from the compiler 2018-12-19 23:17:53 +03:00
libsyntax_pos Reintroduce special pretty-printing for $crate when it's necessary for proc macros 2018-12-19 23:17:54 +03:00
libterm Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
libtest Auto merge of #56243 - RalfJung:test-deterministic, r=alexcrichton 2018-12-11 14:04:15 +00:00
libunwind std: Depend directly on crates.io crates 2018-12-11 21:08:22 -08:00
llvm@f4728ed8fa Update LLVM submodule 2018-12-18 15:26:10 +05:30
llvm-emscripten@7f23313edf Pull in fix for dist-i686-linux build 2018-11-09 16:59:45 +01:00
rtstartup Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
rustc std: Depend directly on crates.io crates 2018-12-11 21:08:22 -08:00
rustllvm Auto merge of #56642 - nikic:llvm-6, r=alexcrichton 2018-12-17 04:18:14 +00:00
stdsimd@3c0503db84 Update the stdsimd submodule 2018-12-10 12:05:33 -08:00
test enum type instead of variant suggestion unification 2018-12-22 17:40:48 -08:00
tools Auto merge of #56680 - vakaras:issue56280, r=nagisa 2018-12-22 17:46:11 +00:00
.gitignore
README.md rustc-guide has moved 2018-11-26 15:03:13 -06:00
stage0.txt Bump to 1.33.0 2018-12-12 08:09:26 -08:00

This directory contains the source code of the rust project, including:

  • rustc and its tests
  • libstd
  • Various submodules for tools, like rustdoc, rls, etc.

For more information on how various parts of the compiler work, see the rustc guide.

There is also useful content in the following READMEs, which are gradually being moved over to the guide: