This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +27
-16
lines changed Expand file tree Collapse file tree 3 files changed +27
-16
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,24 @@ fn transmute() {
163
163
) ;
164
164
}
165
165
166
+ #[ test]
167
+ fn read_via_copy ( ) {
168
+ check_number (
169
+ r#"
170
+ extern "rust-intrinsic" {
171
+ pub fn read_via_copy<T>(e: *const T) -> T;
172
+ pub fn volatile_load<T>(e: *const T) -> T;
173
+ }
174
+
175
+ const GOAL: i32 = {
176
+ let x = 2;
177
+ read_via_copy(&x) + volatile_load(&x)
178
+ };
179
+ "# ,
180
+ 4 ,
181
+ ) ;
182
+ }
183
+
166
184
#[ test]
167
185
fn const_eval_select ( ) {
168
186
check_number (
Original file line number Diff line number Diff line change @@ -888,6 +888,13 @@ impl Evaluator<'_> {
888
888
}
889
889
not_supported ! ( "FnOnce was not available for executing const_eval_select" ) ;
890
890
}
891
+ "read_via_copy" | "volatile_load" => {
892
+ let [ arg] = args else {
893
+ return Err ( MirEvalError :: TypeError ( "read_via_copy args are not provided" ) ) ;
894
+ } ;
895
+ let addr = Address :: from_bytes ( arg. interval . get ( self ) ?) ?;
896
+ destination. write_from_interval ( self , Interval { addr, size : destination. size } )
897
+ }
891
898
_ => not_supported ! ( "unknown intrinsic {name}" ) ,
892
899
}
893
900
}
Original file line number Diff line number Diff line change @@ -64,22 +64,8 @@ You can install the latest release of the plugin from
64
64
https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer[the marketplace].
65
65
66
66
Note that the plugin may cause conflicts with the
67
- https://marketplace.visualstudio.com/items?itemName=rust-lang.rust[official Rust plugin].
68
- It is recommended to disable the Rust plugin when using the rust-analyzer extension.
69
-
70
- By default, the plugin will prompt you to download the matching version of the server as well:
71
-
72
- image::https://user-images.githubusercontent.com/9021944/75067008-17502500-54ba-11ea-835a-f92aac50e866.png[]
73
-
74
- [NOTE]
75
- ====
76
- To disable this notification put the following to `settings.json`
77
-
78
- [source,json]
79
- ----
80
- { "rust-analyzer.updates.askBeforeDownload": false }
81
- ----
82
- ====
67
+ https://marketplace.visualstudio.com/items?itemName=rust-lang.rust[previous official Rust plugin].
68
+ The latter is no longer maintained and should be uninstalled.
83
69
84
70
The server binary is stored in the extension install directory, which starts with `rust-lang.rust-analyzer-` and is located under:
85
71
You can’t perform that action at this time.
0 commit comments