-
Notifications
You must be signed in to change notification settings - Fork 542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update rustc_driver examples #1803
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Hi, I couldn't run the example. I cloned the rust repository and specified the dependencies in
Here is my Cargo.toml [package]
name = "package-name"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
rustc_driver = {path = "rust/compiler/rustc_driver"}
rustc_error_codes = {path = "rust/compiler/rustc_error_codes"}
rustc_errors = {path = "rust/compiler/rustc_errors"}
rustc_hir = {path = "rust/compiler/rustc_hir"}
rustc_interface = {path = "rust/compiler/rustc_interface"}
rustc_session = {path = "rust/compiler/rustc_session"}
rustc_span = {path = "rust/compiler/rustc_span"}
rustc-hash = "1.1.0" I built the compiler with these steps |
Please follow the steps on README: https://github.com/rust-lang/rustc-dev-guide/blob/master/examples/README |
Update books ## rust-lang/reference 2 commits in 5262e1c3b43a2c489df8f6717683a44c7a2260fd..142b2ed77d33f37a9973772bd95e6144ed9dce43 2023-10-07 19:41:21 UTC to 2023-09-26 12:26:35 UTC - replace 'UB on raw ptr deref' with UB on place projection/access (rust-lang/reference#1387) - docs: Fix links to ECMA standards in `attributes.md` (rust-lang/reference#1408) ## rust-lang/rust-by-example 11 commits in c954202c1e1720cba5628f99543cc01188c7d6fc..8eb3a01ab74c567b7174784892fb807f2c632d6b 2023-09-26 12:38:17 UTC to 2023-09-26 12:29:10 UTC - fixed a typo in the lifetime.md (rust-lang/rust-by-example#1737) - Misleading textual statement in HOF (rust-lang/rust-by-example#1731) - Equalize title from respective file with title in SUMMARY.md (rust-lang/rust-by-example#1738) - Added explanation for compiling and executing match_args.rs. (rust-lang/rust-by-example#1739) - Wrapped long lines and put #[doc] in backquotes. (rust-lang/rust-by-example#1740) - Update read_lines example to flatten iterator (rust-lang/rust-by-example#1742) - Update while_let.md: address inconsistent use of fn main between 2 co… (rust-lang/rust-by-example#1744) - [TRIVIAL] Remove confusing `also` (rust-lang/rust-by-example#1746) - Fix and extend the explanation of outer vs inner attributes. (rust-lang/rust-by-example#1748) - Fix uncorresponded back quote (rust-lang/rust-by-example#1749) - Fix format in constants.md (rust-lang/rust-by-example#1741) ## rust-lang/rustc-dev-guide 3 commits in a13b7c2..b98af7d 2023-10-05 19:48:35 UTC to 2023-09-27 22:57:27 UTC - update new trait solver docs (rust-lang/rustc-dev-guide#1802) - update rustc_driver examples (rust-lang/rustc-dev-guide#1803) - test headers: fix `compile-flags` example (rust-lang/rustc-dev-guide#1800)
Update books ## rust-lang/reference 2 commits in 5262e1c3b43a2c489df8f6717683a44c7a2260fd..142b2ed77d33f37a9973772bd95e6144ed9dce43 2023-10-07 19:41:21 UTC to 2023-09-26 12:26:35 UTC - replace 'UB on raw ptr deref' with UB on place projection/access (rust-lang/reference#1387) - docs: Fix links to ECMA standards in `attributes.md` (rust-lang/reference#1408) ## rust-lang/rust-by-example 11 commits in c954202c1e1720cba5628f99543cc01188c7d6fc..8eb3a01ab74c567b7174784892fb807f2c632d6b 2023-09-26 12:38:17 UTC to 2023-09-26 12:29:10 UTC - fixed a typo in the lifetime.md (rust-lang/rust-by-example#1737) - Misleading textual statement in HOF (rust-lang/rust-by-example#1731) - Equalize title from respective file with title in SUMMARY.md (rust-lang/rust-by-example#1738) - Added explanation for compiling and executing match_args.rs. (rust-lang/rust-by-example#1739) - Wrapped long lines and put #[doc] in backquotes. (rust-lang/rust-by-example#1740) - Update read_lines example to flatten iterator (rust-lang/rust-by-example#1742) - Update while_let.md: address inconsistent use of fn main between 2 co… (rust-lang/rust-by-example#1744) - [TRIVIAL] Remove confusing `also` (rust-lang/rust-by-example#1746) - Fix and extend the explanation of outer vs inner attributes. (rust-lang/rust-by-example#1748) - Fix uncorresponded back quote (rust-lang/rust-by-example#1749) - Fix format in constants.md (rust-lang/rust-by-example#1741) ## rust-lang/rustc-dev-guide 3 commits in a13b7c2..b98af7d 2023-10-05 19:48:35 UTC to 2023-09-27 22:57:27 UTC - update new trait solver docs (rust-lang/rustc-dev-guide#1802) - update rustc_driver examples (rust-lang/rustc-dev-guide#1803) - test headers: fix `compile-flags` example (rust-lang/rustc-dev-guide#1800)
Update books ## rust-lang/reference 2 commits in 5262e1c3b43a2c489df8f6717683a44c7a2260fd..142b2ed77d33f37a9973772bd95e6144ed9dce43 2023-10-07 19:41:21 UTC to 2023-09-26 12:26:35 UTC - replace 'UB on raw ptr deref' with UB on place projection/access (rust-lang/reference#1387) - docs: Fix links to ECMA standards in `attributes.md` (rust-lang/reference#1408) ## rust-lang/rust-by-example 11 commits in c954202c1e1720cba5628f99543cc01188c7d6fc..8eb3a01ab74c567b7174784892fb807f2c632d6b 2023-09-26 12:38:17 UTC to 2023-09-26 12:29:10 UTC - fixed a typo in the lifetime.md (rust-lang/rust-by-example#1737) - Misleading textual statement in HOF (rust-lang/rust-by-example#1731) - Equalize title from respective file with title in SUMMARY.md (rust-lang/rust-by-example#1738) - Added explanation for compiling and executing match_args.rs. (rust-lang/rust-by-example#1739) - Wrapped long lines and put #[doc] in backquotes. (rust-lang/rust-by-example#1740) - Update read_lines example to flatten iterator (rust-lang/rust-by-example#1742) - Update while_let.md: address inconsistent use of fn main between 2 co… (rust-lang/rust-by-example#1744) - [TRIVIAL] Remove confusing `also` (rust-lang/rust-by-example#1746) - Fix and extend the explanation of outer vs inner attributes. (rust-lang/rust-by-example#1748) - Fix uncorresponded back quote (rust-lang/rust-by-example#1749) - Fix format in constants.md (rust-lang/rust-by-example#1741) ## rust-lang/rustc-dev-guide 3 commits in a13b7c2..b98af7d 2023-10-05 19:48:35 UTC to 2023-09-27 22:57:27 UTC - update new trait solver docs (rust-lang/rustc-dev-guide#1802) - update rustc_driver examples (rust-lang/rustc-dev-guide#1803) - test headers: fix `compile-flags` example (rust-lang/rustc-dev-guide#1800)
Update books ## rust-lang/reference 2 commits in 5262e1c3b43a2c489df8f6717683a44c7a2260fd..142b2ed77d33f37a9973772bd95e6144ed9dce43 2023-10-07 19:41:21 UTC to 2023-09-26 12:26:35 UTC - replace 'UB on raw ptr deref' with UB on place projection/access (rust-lang/reference#1387) - docs: Fix links to ECMA standards in `attributes.md` (rust-lang/reference#1408) ## rust-lang/rust-by-example 11 commits in c954202c1e1720cba5628f99543cc01188c7d6fc..8eb3a01ab74c567b7174784892fb807f2c632d6b 2023-09-26 12:38:17 UTC to 2023-09-26 12:29:10 UTC - fixed a typo in the lifetime.md (rust-lang/rust-by-example#1737) - Misleading textual statement in HOF (rust-lang/rust-by-example#1731) - Equalize title from respective file with title in SUMMARY.md (rust-lang/rust-by-example#1738) - Added explanation for compiling and executing match_args.rs. (rust-lang/rust-by-example#1739) - Wrapped long lines and put #[doc] in backquotes. (rust-lang/rust-by-example#1740) - Update read_lines example to flatten iterator (rust-lang/rust-by-example#1742) - Update while_let.md: address inconsistent use of fn main between 2 co… (rust-lang/rust-by-example#1744) - [TRIVIAL] Remove confusing `also` (rust-lang/rust-by-example#1746) - Fix and extend the explanation of outer vs inner attributes. (rust-lang/rust-by-example#1748) - Fix uncorresponded back quote (rust-lang/rust-by-example#1749) - Fix format in constants.md (rust-lang/rust-by-example#1741) ## rust-lang/rustc-dev-guide 3 commits in a13b7c2..b98af7d 2023-10-05 19:48:35 UTC to 2023-09-27 22:57:27 UTC - update new trait solver docs (rust-lang/rustc-dev-guide#1802) - update rustc_driver examples (rust-lang/rustc-dev-guide#1803) - test headers: fix `compile-flags` example (rust-lang/rustc-dev-guide#1800)
Rollup merge of rust-lang#116574 - rustbot:docs-update, r=ehuss Update books ## rust-lang/reference 2 commits in 5262e1c3b43a2c489df8f6717683a44c7a2260fd..142b2ed77d33f37a9973772bd95e6144ed9dce43 2023-10-07 19:41:21 UTC to 2023-09-26 12:26:35 UTC - replace 'UB on raw ptr deref' with UB on place projection/access (rust-lang/reference#1387) - docs: Fix links to ECMA standards in `attributes.md` (rust-lang/reference#1408) ## rust-lang/rust-by-example 11 commits in c954202c1e1720cba5628f99543cc01188c7d6fc..8eb3a01ab74c567b7174784892fb807f2c632d6b 2023-09-26 12:38:17 UTC to 2023-09-26 12:29:10 UTC - fixed a typo in the lifetime.md (rust-lang/rust-by-example#1737) - Misleading textual statement in HOF (rust-lang/rust-by-example#1731) - Equalize title from respective file with title in SUMMARY.md (rust-lang/rust-by-example#1738) - Added explanation for compiling and executing match_args.rs. (rust-lang/rust-by-example#1739) - Wrapped long lines and put #[doc] in backquotes. (rust-lang/rust-by-example#1740) - Update read_lines example to flatten iterator (rust-lang/rust-by-example#1742) - Update while_let.md: address inconsistent use of fn main between 2 co… (rust-lang/rust-by-example#1744) - [TRIVIAL] Remove confusing `also` (rust-lang/rust-by-example#1746) - Fix and extend the explanation of outer vs inner attributes. (rust-lang/rust-by-example#1748) - Fix uncorresponded back quote (rust-lang/rust-by-example#1749) - Fix format in constants.md (rust-lang/rust-by-example#1741) ## rust-lang/rustc-dev-guide 3 commits in a13b7c2..b98af7d 2023-10-05 19:48:35 UTC to 2023-09-27 22:57:27 UTC - update new trait solver docs (rust-lang/rustc-dev-guide#1802) - update rustc_driver examples (rust-lang/rustc-dev-guide#1803) - test headers: fix `compile-flags` example (rust-lang/rustc-dev-guide#1800)
It's been a while since the rustc driver examples were updated and they no longer compile because new fields were added to
rustc_interface::config::Config
, so I thought I'd submit a PR to fix them up. Their values don't seem very important for the purposes of the specific examples so I just left them at their default value.