Files
pplus-core/mojo/golden/2bc5f61e04820d7f95e41b55f6b0983ed69ad7920e7a33790f81d1df3bb136df.json
T
2026-10-05 03:03:38 +00:00

160 lines
5.1 KiB
JSON

{
"args": "",
"askedAt": "2026-10-03T14:25:49+00:00",
"compiler": "mojo_1_1_0",
"firstItem": "manual/snippet/manual-values-ownership-3",
"key": "2bc5f61e04820d7f95e41b55f6b0983ed69ad7920e7a33790f81d1df3bb136df",
"mode": "run",
"raw": {
"buildResult": {
"code": 1,
"compilationOptions": [
"build",
"/app/example.mojo"
],
"downloads": [],
"execTime": 233,
"executableFilename": "/nosym/tmp/compiler-explorer-compilerxWK65v/example",
"inputFilename": "example.mojo",
"instructionSet": "amd64",
"okToCache": true,
"processExecutionResultTime": 0.16486399993300438,
"stderr": [
{
"tag": {
"column": 15,
"file": "example.mojo",
"line": 2,
"severity": 3,
"text": "error: 'List[Int]' value has no attribute '__str__'"
},
"text": "<source>:2:15: error: 'List[Int]' value has no attribute '__str__'"
},
{
"text": " print(list.__str__())"
},
{
"text": " ~~~~^"
},
{
"tag": {
"column": 5,
"file": "example.mojo",
"line": 6,
"severity": 3,
"text": "error: invalid call to 'append': invalid use of mutating method on rvalue of type 'List[Int]'"
},
"text": "<source>:6:5: error: invalid call to 'append': invalid use of mutating method on rvalue of type 'List[Int]'"
},
{
"tag": {
"column": 0,
"file": "l.append",
"line": 5,
"severity": 3,
"text": ""
},
"text": " l.append(5)"
},
{
"text": " ^~~~~~~~"
},
{
"text": "Mojo/stdlib/std/collections/list.mojo:927:1: note: function declared here"
},
{
"text": "def append(mut self, var value: T, /) where conforms_to(T, Movable) # note - synthetic signature"
},
{
"text": "^"
},
{
"tag": {
"column": 12,
"file": "example.mojo",
"line": 7,
"severity": 3,
"text": "error: value of type 'List[Int]' cannot be implicitly copied, it does not conform to 'ImplicitlyCopyable'"
},
"text": "<source>:7:12: error: value of type 'List[Int]' cannot be implicitly copied, it does not conform to 'ImplicitlyCopyable'"
},
{
"text": " return l"
},
{
"text": " ^"
},
{
"tag": {
"column": 12,
"file": "example.mojo",
"line": 7,
"severity": 1,
"text": "note: consider transferring the value with '^'"
},
"text": "<source>:7:12: note: consider transferring the value with '^'"
},
{
"text": " return l"
},
{
"text": " ^"
},
{
"text": " ^"
},
{
"tag": {
"column": 12,
"file": "example.mojo",
"line": 7,
"severity": 1,
"text": "note: you can copy it explicitly with '.copy()'"
},
"text": "<source>:7:12: note: you can copy it explicitly with '.copy()'"
},
{
"text": " return l"
},
{
"text": " ^"
},
{
"text": " .copy()"
},
{
"text": "/opt/compiler-explorer/mojo-1.1.0/bin/mojo: error: failed to parse the provided Mojo source module"
}
],
"stdout": [],
"timedOut": false,
"truncated": false
},
"code": -1,
"didExecute": false,
"execTime": 312,
"okToCache": false,
"queueTime": 4,
"stderr": [
{
"text": "Build failed"
}
],
"stdout": [],
"timedOut": false
},
"result": {
"asm": null,
"buildStderr": "<source>:2:15: error: 'List[Int]' value has no attribute '__str__'\n print(list.__str__())\n ~~~~^\n<source>:6:5: error: invalid call to 'append': invalid use of mutating method on rvalue of type 'List[Int]'\n l.append(5)\n ^~~~~~~~\nMojo/stdlib/std/collections/list.mojo:927:1: note: function declared here\ndef append(mut self, var value: T, /) where conforms_to(T, Movable) # note - synthetic signature\n^\n<source>:7:12: error: value of type 'List[Int]' cannot be implicitly copied, it does not conform to 'ImplicitlyCopyable'\n return l\n ^\n<source>:7:12: note: consider transferring the value with '^'\n return l\n ^\n ^\n<source>:7:12: note: you can copy it explicitly with '.copy()'\n return l\n ^\n .copy()\n/opt/compiler-explorer/mojo-1.1.0/bin/mojo: error: failed to parse the provided Mojo source module",
"compiled": false,
"executed": false,
"exitCode": -1,
"stderr": "Build failed",
"stdout": "",
"timedOut": false
},
"seconds": 0.54,
"sourceSha256": "9902a4c16fe02fc943bf78d9ea8e17e69e4a856937097a13b78f4c706fa624a1",
"stdin": ""
}