bors
21e5dc2af9
Auto merge of #14881 - Veykril:name-display, r=Veykril
...
internal: Replace Display impl for Name
This allows us to plug in interner for `Name`s that live inside the database.
2023-05-25 12:04:16 +00:00
bors
293d2e15d5
Auto merge of #110906 - ekusiadadus:ekusiadadus/fix-bash-complete-etc, r=albertlarsan68
...
fix: 🐛 etc/bash_complettion -> src/etc/... to avoid copy error
## why
I got an error on executing `./x.py build && ./x.py install`.
Found creating some folder in `/etc/bash_completion.d/`, It appears to be incorrect to attempt to create a folder in `/etc/bash_completion.d/`, as this proccess requires `sudo`.
Fixes #111653
```
Uplifting rustc (stage1 -> stage3)
Building tool cargo (stage2 -> stage3, x86_64-unknown-linux-gnu)
Finished release [optimized] target(s) in 0.16s
Building tool cargo-credential-1password (stage2 -> stage3, x86_64-unknown-linux-gnu)
Finished release [optimized] target(s) in 0.06s
Dist cargo-1.71.0-dev-x86_64-unknown-linux-gnu
finished in 10.700 seconds
Installing stage2 cargo (x86_64-unknown-linux-gnu)
install: uninstalling component 'cargo'
install: creating uninstall script at /home/ekusiadadus/.rustup/toolchains/dev/lib/rustlib/uninstall.sh
install: installing component 'cargo'
/home/ekusiadadus/dev/rust/rust/build/tmp/tarball/cargo/x86_64-unknown-linux-gnu/cargo-1.71.0-dev-x86_64-unknown-linux-gnu/install.sh: 310: cd: can't cd to /etc/bash_completion.d
cp: cannot create regular file '/cargo': Permission denied
chmod: cannot access '/cargo': No such file or directory
install: error: file creation failed. see logs at '/home/ekusiadadus/.rustup/toolchains/dev/lib/rustlib/install.log'
Build completed unsuccessfully in 0:01:11
```
Error Log
```
install: uninstalling component 'cargo'
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/bin/cargo
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/bin/cargo
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/libexec/cargo-credential-1password
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/libexec/cargo-credential-1password
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/doc/rust/LICENSE-APACHE
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/doc/rust/LICENSE-APACHE
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/doc/rust/LICENSE-MIT
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/doc/rust/LICENSE-MIT
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/doc/rust/LICENSE-THIRD-PARTY
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/doc/rust/LICENSE-THIRD-PARTY
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/doc/rust/README.md
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/doc/rust/README.md
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-add.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-add.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-bench.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-bench.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-build.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-build.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-check.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-check.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-clean.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-clean.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-doc.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-doc.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-fetch.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-fetch.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-fix.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-fix.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-generate-lockfile.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-generate-lockfile.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-help.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-help.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-init.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-init.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-install.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-install.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-locate-project.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-locate-project.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-login.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-login.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-logout.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-logout.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-metadata.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-metadata.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-new.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-new.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-owner.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-owner.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-package.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-package.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-pkgid.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-pkgid.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-publish.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-publish.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-remove.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-remove.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-report.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-report.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-run.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-run.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-rustc.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-rustc.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-rustdoc.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-rustdoc.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-search.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-search.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-test.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-test.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-tree.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-tree.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-uninstall.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-uninstall.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-update.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-update.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-vendor.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-vendor.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-verify-project.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-verify-project.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-version.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-version.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-yank.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-yank.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo.1
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo.1
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/zsh/site-functions/_cargo
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/zsh/site-functions/_cargo
install: removing file /home/ekusiadadus/.rustup/toolchains/dev/src/etc/bash_completion.d/cargo
$ rm -f /home/ekusiadadus/.rustup/toolchains/dev/src/etc/bash_completion.d/cargo
install: removing component manifest /home/ekusiadadus/.rustup/toolchains/dev/lib/rustlib/manifest-cargo
$ rm /home/ekusiadadus/.rustup/toolchains/dev/lib/rustlib/manifest-cargo
$ echo "rust-analyzer-preview
rustfmt-preview
rust-demangler-preview
clippy-preview
miri-preview
llvm-tools-preview
rust-src
rustc
rust-docs
rust-std-x86_64-unknown-linux-gnu" > "/home/ekusiadadus/.rustup/toolchains/dev/lib/rustlib/components"
$ umask 022 && mkdir -p "/home/ekusiadadus/.rustup/toolchains/dev/lib/rustlib"
$ echo "3" > "/home/ekusiadadus/.rustup/toolchains/dev/lib/rustlib/rust-installer-version"
install: creating uninstall script at /home/ekusiadadus/.rustup/toolchains/dev/lib/rustlib/uninstall.sh
$ cp /home/ekusiadadus/dev/rust/rust/build/tmp/tarball/cargo/x86_64-unknown-linux-gnu/cargo-1.71.0-dev-x86_64-unknown-linux-gnu/install.sh /home/ekusiadadus/.rustup/toolchains/dev/lib/rustlib/uninstall.sh
install: installing component 'cargo'
$ echo "cargo" >> "/home/ekusiadadus/.rustup/toolchains/dev/lib/rustlib/components"
$ umask 022 && mkdir -p "/home/ekusiadadus/.rustup/toolchains/dev/bin"
install: copying file /home/ekusiadadus/.rustup/toolchains/dev/bin/cargo
$ cp /home/ekusiadadus/dev/rust/rust/build/tmp/tarball/cargo/x86_64-unknown-linux-gnu/cargo-1.71.0-dev-x86_64-unknown-linux-gnu/cargo/bin/cargo /home/ekusiadadus/.rustup/toolchains/dev/bin/cargo
$ chmod 755 /home/ekusiadadus/.rustup/toolchains/dev/bin/cargo
$ echo "file:/home/ekusiadadus/.rustup/toolchains/dev/bin/cargo" >> "/home/ekusiadadus/.rustup/toolchains/dev/lib/rustlib/manifest-cargo"
$ umask 022 && mkdir -p "/etc/bash_completion.d"
install: copying file /cargo
$ cp /home/ekusiadadus/dev/rust/rust/build/tmp/tarball/cargo/x86_64-unknown-linux-gnu/cargo-1.71.0-dev-x86_64-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo /cargo
$ chmod 644 /cargo
install: error: file creation failed. see logs at '/home/ekusiadadus/.rustup/toolchains/dev/lib/rustlib/install.log'
```
2023-05-25 11:21:17 +00:00
alibektas
1222869b3e
Fix #14557 . Docs aliases can now be detected and used in searching for workspace symbols
2023-05-24 23:57:24 +02:00
bors
a512774fd9
Auto merge of #14752 - ponyii:fix/generate_derive_breaks_indentation, r=Veykril
...
fix: assists no longer break indentation
Fixes https://github.com/rust-lang/rust-analyzer/issues/14674
These are _ad hoc_ patches for a number of assists that can produce incorrectly indented code, namely:
- generate_derive
- add_missing_impl_members
- add_missing_default_members
Some general solution is required in future, as the same problem arises in many other assists, e.g.
- replace_derive_with...
- generate_default_from_enum...
- generate_default_from_new
- generate_delegate_methods
(the list is incomplete)
2023-05-24 18:58:07 +00:00
Lukas Wirth
c7ef6c25b7
internal: Replace Display impl for Name
2023-05-24 20:55:12 +02:00
bors
2f840c2236
Auto merge of #14874 - Veykril:crate-cfg, r=Veykril
...
expand: Change how `#![cfg(FALSE)]` behaves on crate root
Closes https://github.com/rust-lang/rust-analyzer/issues/14769
2023-05-24 16:06:09 +00:00
Luna Razzaghipour
430bdd3509
Run the main thread under the User Interactive QoS class
2023-05-25 00:22:14 +10:00
Luna Razzaghipour
578d99477a
Move on-type formatting request handler onto the main thread
2023-05-25 00:16:52 +10:00
bors
8ad70e7f99
Auto merge of #14866 - AndreasBackx:feature/doc-comments-markdown, r=Veykril
...
[editors/code] add markdown syntax highlighting to doc comments
_This is a continuation of https://github.com/microsoft/vscode/pull/169956 and https://github.com/dustypomerleau/rust-syntax/pull/37 (that repo is no longer maintained: https://github.com/dustypomerleau/rust-syntax/issues/39#issuecomment-1427339029 ). The VS Code team seemed to prefer this being inside of an extension._
This adds Markdown highlighting to doc comment lines and blocks. Currently it is thus regarded both as a comment and as Markdown which leads to normally foreground text being in the colour of the comment and the rest highlighted like Markdown or its own embedded languages in code blocks.
![image](https://github.com/rust-lang/rust-analyzer/assets/1593486/c84f2e83-faea-47ca-853d-3728a07b2b66 )
![image](https://github.com/rust-lang/rust-analyzer/assets/1593486/f4191425-32cd-451c-ae3a-29a0970ce7a2 )
Block comments are supported, but currently not when there is a `*` at the start of the line:
![image](https://github.com/rust-lang/rust-analyzer/assets/1593486/ce3b58d5-9dca-4376-bffe-4f5a54acbe37 )
![image](https://github.com/rust-lang/rust-analyzer/assets/1593486/b73a5ee6-a178-4aef-a0e4-3d75e4e7d8e5 )
I'm not entirely sure if I can easily fix this, I'd need to find a way to make the content ignore the `*`. Though I'm unsure if it's important as there are [conventions against using block comments](
https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#use-line-comments ) and using them without `*` does work. All of this TextMate grammar is so hard to find documentation on that _honestly_ I'd just not want to support this considering the effort.
Let me know what everyone thinks of this being in rust-analyzer. I've personally found it hard to write large amounts of Rust documentation due to the lack of Markdown syntax highlighting.
Also, thank you `@adenine-dev` as well for making this available in the interim and your enthousiasm. Wanted to get this PR out sooner, but life gets in the way.
2023-05-24 11:33:41 +00:00
bors
2df56cadcb
Auto merge of #14755 - poliorcetics:clippy-fixes, r=Veykril
...
Fix: a TODO and some clippy fixes
- fix(todo): implement IntoIterator for ArenaMap<IDX, V>
- chore: remove unused method
- fix: remove useless `return`s
- fix: various clippy lints
- fix: simplify boolean test to a single negation
2023-05-24 11:13:52 +00:00
Lukas Wirth
74d6826858
expand: Change how #![cfg(FALSE)]
behaves on crate root
2023-05-24 13:02:38 +02:00
bors
1d1a1195f3
Auto merge of #14880 - Veykril:intern-double, r=Veykril
...
Remove double lookups from Interned
2023-05-24 10:58:46 +00:00
Lukas Wirth
12d4355c60
Remove double lookups from Interned
2023-05-24 12:54:25 +02:00
alibektas
51ec2ced69
Improve ast::make
...
Add `ty_alias` and make `impl_trait` , `fn` and `impl_` have more coverage.
2023-05-23 03:12:57 +02:00
bors
2120c913c2
Auto merge of #14872 - lowr:fix/ref-pat-with-type-var, r=HKalbasi
...
fix: introduce new type var when expectation for ref pat is not ref
Fixes #14840
When we infer the type of ref patterns, its expected type may not be reference type: 1) expected type is an unresolved inference variable, or 2) expected type is erroneously other kind of type. In either case, we should produce a reference type with a new type variable rather than an error type so that we can continue inferring the inner patterns without further errors because of the (possible) type mismatch of this pattern.
2023-05-22 19:53:39 +00:00
Ryo Yoshida
01f42d2405
fix: introduce new type var when expectation for ref pat is not ref
2023-05-22 23:13:41 +09:00
Andreas Backx
09f624721c
[editors/code] add markdown syntax highlighting to doc comments
2023-05-21 17:34:42 +01:00
bors
7ac161ce77
Auto merge of #14863 - lowr:fix/extract-fn-nested-tt, r=lnicola
...
fix: consider all tokens in macro expr when analyzing locals
Fixes #14687
2 fixes for `extract_function` assist (related closely enough that I squashed into one commit):
- Locals in macro expressions have been analyzed only when they are in the top-level token tree the macro call wraps. We should consider all descendant tokens.
- `self` in macro expressions haven't been analyzed.
2023-05-21 12:40:29 +00:00
Ryo Yoshida
7b70988d48
fix: consider all tokens in macro expr when analyzing locals
...
Also consider `self` token along with ordinary identifiers.
2023-05-21 20:07:36 +09:00
bors
a04d8456be
Auto merge of #14855 - HKalbasi:mir, r=HKalbasi
...
Consider block impls in `lookup_impl_assoc_item_for_trait_ref`
fix #14782
2023-05-20 20:55:22 +00:00
Luna Razzaghipour
a416248296
Extract platform-specific QoS code into module
2023-05-21 02:48:30 +10:00
Luna Razzaghipour
bb02ae7532
Add doc comments for QoSClass
2023-05-21 02:02:30 +10:00
Luna Razzaghipour
91f4fbe596
Improve comments
2023-05-21 02:02:21 +10:00
Luna Razzaghipour
ca6461c143
Add proof-of-concept QoS implementation
2023-05-20 22:29:32 +10:00
bors
4de8c0980e
Auto merge of #14857 - Veykril:perf, r=Veykril
...
internal: Shrink ProcMacroExpander from 8 to 4 bytes
2023-05-20 10:00:43 +00:00
Lukas Wirth
14dc1ac3bf
internal: Shrink ProcMacroExpander from 8 to 4 bytes
2023-05-20 11:31:28 +02:00
hkalbasi
92d6670f72
Consider block impls in lookup_impl_assoc_item_for_trait_ref
2023-05-20 01:11:17 +03:30
bors
bb78059be4
Auto merge of #14847 - HKalbasi:layout, r=HKalbasi
...
Reduce MIR memory usage
2023-05-19 12:06:11 +00:00
bors
ce936177f9
Auto merge of #14851 - HKalbasi:mir, r=HKalbasi
...
Handle match scrutinee in closure captures
fix #14754
2023-05-19 11:25:40 +00:00
hkalbasi
60379dabfb
resolve types in closure capture copy detection
2023-05-19 14:54:57 +03:30
hkalbasi
c5ea2d7adc
handle match scrutinee in closure captures
2023-05-19 12:04:12 +03:30
bors
e8ae2d3976
Auto merge of #14848 - bm-w:fix/highlight-let-else-return, r=Veykril
...
Fix `preorder_expr` skipping the `else` block of let-else statements
Fixes exit/yield points not getting highlighted in such blocks for `highlight_related` (#14813 ; and possibly other bugs in features that use `preorder_expr`).
2023-05-19 07:41:46 +00:00
Lukas Wirth
c0519daf3b
Update crates/ide-db/src/syntax_helpers/node_ext.rs
...
Co-authored-by: Bastiaan Marinus van de Weerd <id@bm-w.eu>
2023-05-19 09:33:57 +02:00
Bastiaan Marinus van de Weerd
5857836047
Fix preorder_expr
skipping the else
block of let-else statements
...
Fixes exit/yield points not getting highlighted in such blocks for `highlight_related` (#14813 ; and possibly other bugs in features that use `preorder_expr`).
2023-05-18 18:30:27 -04:00
bors
6dea3307cf
Auto merge of #111345 - jyn514:cfg-release-caching, r=cjgillot,est31
...
Only depend on CFG_VERSION in rustc_interface
This avoids having to rebuild the whole compiler on each commit when `omit-git-hash = false`.
cc https://github.com/rust-lang/rust/issues/76720 - this won't fix it, and I'm not suggesting we turn this on by default, but it will make it less painful for people who do have `omit-git-hash` on as a workaround.
2023-05-18 21:45:02 +00:00
hkalbasi
23ce228d54
Reduce MIR memory usage
2023-05-19 00:16:52 +03:30
bors
e110696118
Auto merge of #14845 - HKalbasi:layout, r=HKalbasi
...
Add layout info for enum variant and locals
The size of enum variant is what rustdoc shows (https://github.com/rust-lang/rust/pull/86263 ). I also added layout info for locals since it helps finding size of unnameable types like closures inside other structs or impl traits.
2023-05-18 19:56:16 +00:00
hkalbasi
cae9660a1d
Add layout info for enum variant and locals
2023-05-18 21:03:03 +03:30
bors
54129fa113
Auto merge of #14789 - HKalbasi:mir, r=HKalbasi
...
Add `moved-out-of-ref` diagnostic
This is marked as experimental, since spans are terrible, there are some false positives due #14754 , and it doesn't play well with unknown types. But I hope we can soon lift it.
2023-05-18 15:54:14 +00:00
hkalbasi
b55fbd3ad7
Add moved-out-of-ref
diagnostic
2023-05-18 19:17:06 +03:30
bors
09d1265e1e
Auto merge of #14843 - HKalbasi:mir3, r=HKalbasi
...
Partially support panic message in `MirEvalError`
And bring the metrics back, by using `::core` instead of `$crate` in `format_args!` (it looks like eager macros don't support them).
2023-05-18 15:15:45 +00:00
hkalbasi
4adfbbfbad
partially support panic message in MirEvalError
2023-05-18 18:30:49 +03:30
bors
9ce95674e8
Auto merge of #14837 - Veykril:rustc-lexer, r=Veykril
...
Support c string literals
2023-05-18 11:55:38 +00:00
bors
4649c8fb07
Auto merge of #110605 - csmoe:open-cgo, r=Kobzol
...
support PGO on custom project
make PGO easier for custom toolchain distribution.
r? `@Kobzol`
2023-05-18 10:03:28 +00:00
Lukas Wirth
3e528b85f9
Fix cstring literals construct &CStr not &str
2023-05-18 12:03:15 +02:00
bors
034d7c8537
Auto merge of #14787 - HKalbasi:mir2, r=HKalbasi
...
MIR episode 5
This PR inits drop support (it is very broken at this stage, some things are dropped multiple time, drop scopes are wrong, ...) and adds stdout support (`println!` doesn't work since its expansion is dummy, but `stdout().write(b"hello world\n")` works if you use `RA_SYSROOT_HACK`) for interpreting. There is no useful unit test that it can interpret yet, but it is a good sign that it didn't hit a major road block yet.
In MIR lowering, it adds support for slice pattern and anonymous const blocks, and some fixes so that we can evaluate `SmolStr::new_inline` in const eval. With these changes, 57 failed mir body remains.
2023-05-18 09:44:26 +00:00
Lukas Wirth
eab295cc73
Fix mir CString lowering not respecting the extra 0 byte for length calc
2023-05-18 11:29:19 +02:00
bors
f9be79603a
Auto merge of #14820 - HKalbasi:format-args, r=HKalbasi
...
Expand `format_args!` with more details
2023-05-18 09:09:06 +00:00
Lukas Wirth
4b577e2bc8
Support c string literals
2023-05-18 11:06:05 +02:00
hkalbasi
5c83e222a3
fix format_args
expansion error with raw strings
2023-05-18 12:32:41 +03:30