Commit Graph

10 Commits

Author SHA1 Message Date
Stan Manilov eae6f4ce66
Remove unused references and simplify one 2025-05-19 14:41:19 +03:00
Tshepang Mbambo 01bbdec63c
Merge pull request #2289 from y1lan/fix_compiler_err_of_examples
Fix compile errors of all the examples
2025-03-29 23:10:13 +02:00
Tshepang Mbambo 86aa63456e
use correct code block markers
This makes this command pass

  mdbook test --chapter "Remarks on perma-unstable features"
2025-03-19 18:06:50 +02:00
xizheyin e0d9704841 Add chapter Remarks on perma-unstable features
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-03-18 20:49:20 +08:00
Yang Lin 832299550c Following commit 401dd84 in the Rust project
(https://github.com/rust-lang/rust),
`ErrorGuaranteed` was replaced by fatal errors.
As a result, `tcx.analysis()` now aborts directly
instead of returning an error guard.
To accommodate this change, this update replaces
`tcx.analysis()` with `typeck()`
to perform type checking in the example.
2025-03-16 23:43:17 +08:00
Florian Brucker 1979d85189 Fix examples to work with nightly-2025-02-13
While there were comments indicating which nightly versions the examples
were tested with, those versions did not work for me: neither did the
examples compile, nor did they produce the expected output.

This commit fixes the compilation issues, using nightly-2025-02-13 for
all examples (previously the version differed between the examples) and,
in the case of the `rustc_driver` examples, also fixes the argument
passing: rustc ignores the first argument, so we need to pass the
filename as the second (otherwise we only get the help text printed).

Note that the `rustc-interface-getting-diagnostics.rs` example still
does not produce any output, which I assume is not how it is intended.
However, I don't know enough to fix it.

To avoid inconsistencies between the documented version and the actually
required version I've moved the version comment from the Markdown into
the Rust code where it hopefully won't be forgotten as easily.

Finally I've clarified in the examples' README that you also need to use
the proper nightly version when compiling the examples, not just when
running them.
2025-02-15 19:44:32 +01:00
bjorn3 76f7584f6a Remove RunCompiler
It has become nothing other than a wrapper around run_compiler.
2025-01-23 09:38:58 +00:00
bjorn3 e70f551db6 Rework the driver docs (#2162) 2024-12-27 20:40:32 +08:00
Christopher Speir de2f32e59c Fix file paths to section 35.1 & 35.2 example code (#2078) 2024-09-25 22:18:50 +08:00
Tbkhi 1374a2ab4a improve rustc-driver.md
minor addition and adding links

Update rustc-driver.md

removing parens for functions

reorganized directory

reorganized directory

minor edits
2024-09-24 20:29:07 +02:00