Fixes#68690
When we generate the proc macro harness, we now explicitly recorder the
order in which we generate entries. We then use this ordering data to
deserialize the correct proc-macro-data from the crate metadata.
add regression test for issue #68794
This is a minimal regression test for the issue #68794: "TEXTREL in
i686", which was fixed with e86019c4a0968a1e393cdd0731649168624a88b8.
The test links a minimal rust static library into a shared library, and
checks that the linker didn't have to add the TEXTREL flag.
For all methods which read a value of type T, `read`, `read_unaligned`,
`read_volatile` and `replace`, added missing
constraint:
The value they point to must be properly initialized
Rollup of 6 pull requests
Successful merges:
- #64069 (Added From<Vec<NonZeroU8>> for CString)
- #66721 (implement LowerExp and UpperExp for integers)
- #69106 (Fix std::fs::copy on WASI target)
- #69154 (Avoid calling `fn_sig` on closures)
- #69166 (Check `has_typeck_tables` before calling `typeck_tables_of`)
- #69180 (Suggest a comma if a struct initializer field fails to parse)
Failed merges:
r? @ghost
Suggest a comma if a struct initializer field fails to parse
Currently, we emit a "try adding a comma" suggestion if a comma is
missing in a struct definition. However, we emit no such suggestion if a
comma is missing in a struct initializer.
This commit adds a "try adding a comma" suggestion when we don't find a
comma during the parsing of a struct initializer field.
The change to `src/test/ui/parser/removed-syntax-with-1.stderr` isn't
great, but I don't see a good way of avoiding it.
Fix std::fs::copy on WASI target
Previously `std::fs::copy` on wasm32-wasi would reuse code from the `sys_common` module and would successfully copy contents of the file just to fail right before closing it.
This was happening because `sys_common::copy` tries to copy permissions of the file, but permissions are not a thing in WASI (at least yet) and `set_permissions` is implemented as an unconditional runtime error.
This change instead adds a custom working implementation of `std::fs::copy` (like Rust already has on some other targets) that doesn't try to call `set_permissions` and is essentially a thin wrapper around `std::io::copy`.
Fixes#68560.
implement LowerExp and UpperExp for integers
Addresses https://github.com/rust-lang/rust/issues/39479
This implementation is heavily based on the preexisting `macro_rules! impl_Display` in the same file. I don't like the liberal use of unsafe in that macro and would like to modify it so `unsafe` is only present where necessary. What is Rust's policy on doing such modifications?
Also, I couldn't figure out where to put tests, can I have some help with that?